[GHC] #15275: AArch64 validation fails with many invalid relocations

#15275: AArch64 validation fails with many invalid relocations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 (Linking) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Test ways requiring the RTS linker (e.g. `ext-interp`) are failing due to the `assert(isInt64(32, addend));` assertion in the `COMPAT_R_AARCH64_ADR_PREL_PG_HI21` of `encodeAddendAarch64`. One such relocation is, {{{ RELOCATION RECORDS FOR [.text]: OFFSET TYPE VALUE 000000000000001c R_AARCH64_ADR_PREL_PG_HI21 stg_upd_frame_info }}} although there are plenty of others. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15275 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15275: AArch64 validation fails with many invalid relocations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 (Linking) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): It seems to me that this may just be the result of us not building with `-fPIC` by default. It seems like fixing this would likely resolve this issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15275#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15275: AArch64 validation fails with many invalid relocations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 (Linking) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Sadly just enabling `-fPIC` by default (using `DynFlags.default_PIC`) seems to make no difference. The problematic relocations are still generated. Linkers are truly awful creations. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15275#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15275: AArch64 validation fails with many invalid relocations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 (Linking) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tmobile): Is there any workaround for this? I'm hitting this while cross-compiling to aarch64 running iserv in qemu. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15275#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15275: AArch64 validation fails with many invalid relocations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 (Linking) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by tmobile): * cc: tmobile (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15275#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15275: AArch64 validation fails with many invalid relocations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 (Linking) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Sadly, not that I know of. I have previously observed this when using `ld.gold`. I'm frankly quite surprised that `R_AARCH64_ADR_PREL_PG_HI21` given that we are compiling with `-fPIC`. I rather suspect this may be (yet another) linker bug. I'm currently trying a build linked with `ld.bfd` to see if it exhibits the same issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15275#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15275: AArch64 validation fails with many invalid relocations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 (Linking) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by arrowd): * cc: arrowd (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15275#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC