#15169: SRT offset optimisation breaks on MachO platforms ---------------------------------+-------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"bf10456edaa03dc010821cd4c3d9f49cb11d89da/ghc" bf10456/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="bf10456edaa03dc010821cd4c3d9f49cb11d89da" Disable the SRT offset optimisation on MachO platforms Unfortunately, this optimisation is infeasible on MachO platforms (e.g. Darwin) due to an object format limitation. Specifically, linking fails with errors of the form: error: unsupported relocation with subtraction expression, symbol '_integerzmgmp_GHCziIntegerziType_quotInteger_closure' can not be undefined in a subtraction expression Apparently MachO does not permit relocations' subtraction expressions to refer to undefined symbols. As far as I can tell this means that it is essentially impossible to express an offset between symbols living in different compilation units. This means that we lively can't use this optimisation on MachO platforms. Test Plan: Validate on Darwin Reviewers: simonmar, erikd Subscribers: rwbarton, thomie, carter, angerman GHC Trac Issues: #15169 Differential Revision: https://phabricator.haskell.org/D4715 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15169#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler