
#13624: loadObj() does not respect alignment -------------------------------------+------------------------------------- Reporter: tmcdonell | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.10.1 Component: Runtime System | Version: 8.0.1 (Linker) | Keywords: linker, Resolution: | newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: 8949 Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by artempyanykh): FWIW, `map.ll` needs to be compiled with `-mcpu=sandybridge`. Otherwise on Haswell the compiler emits `vbroadcastss` instead of `vmovaps` and the issue doesn't manifest itself. ----- I'm currently figuring out Mach-O part. I've adjusted section placement on x86_64 analogous to aarch64, but it's not enough as current x86_64 relocation code works directly with macho_sections. I need to take a closer look at it. I have concerns re: allocating a page per section. It seems feasible do some prep work before `ocGetNames` to calculate the size of future r-x segment and rw- segment and exact placement of sections inside the mmaped areas (although, currently not sure about subsequent changes to mprotecting and unloading code). Oh, and If somebody's already working on this, please let me know :) ---- One question, if I may. Moritz, for iOS you use regular `mmap` instead of `mmapForLinker`. I don't know much about ARM and wonder if allocating in low 2GB is not necessary there? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13624#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler