NIXPKGS-85: patchelf + strip breaks ghcboot
The combination of patchelf and strip -S sometimes produces executables that dont work:
$ strace -fF /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/lib/ghc-6.4.2/ghc-6.4.2
execve(“/nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/lib/ghc-6.4.2/ghc-6.4.2”, [“/nix/store/ka8gghwlgbqxm2b387fbp”…], [/* 32 vars */]) = -1 EINVAL (Invalid argument)
+++ killed by SIGKILL +++Strip also prints out a lot of errors:
BFD: /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/bin/stGgo2oC: section .dynamic lma 0x8047134 overlaps previous sections
BFD: /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/bin/stGgo2oC: section .dynstr lma 0x8047214 overlaps previous sections
BFD: /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/bin/stGgo2oC: section .dynsym lma 0x8047570 overlaps previous sections
BFD: /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/bin/stGgo2oC: section .hash lma 0x8047a40 overlaps previous sections
BFD: /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/bin/stGgo2oC: section .interp lma 0x8047c88 overlaps previous sections
BFD: /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/bin/stGgo2oC: section .note.ABI-tag lma 0x8047cd0 overlaps previous sections
BFD: /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/bin/stGgo2oC: section `.note.ABI-tag cant be allocated in segment 7And when ld-linux is used directly, it says:
$ /nix/store/m2582n03z3jkq2rba5ll9fkh6zl69ylr-glibc-2.7/lib/ld-linux.so.2 /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/lib/ghc-6.4.2/ghc-6.4.2
/nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/lib/ghc-6.4.2/ghc-6.4.2: error while loading shared libraries: /nix/store/ka8gghwlgbqxm2b387fbpgp4agylm1ss-ghc-6.4.2/lib/ghc-6.4.2/ghc-6.4.2: ELF load command address/offset not properly alignedWorked around by passing dontStrip = true to the ghcboot builder.
Submitted on 22 February 2008 at 13:24
Log in to post comments