Date: Tue, 10 Jul 2012 10:59:47 +0000 From: Eric McCorkle <eric@shadowsun.net> To: freebsd-hackers@freebsd.org Subject: Clang, EFI and bad offsets Message-ID: <4FFC0B23.1010404@shadowsun.net>
next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In the process of the EFI on intel work, I ran across a strange issue. The procedure for creating loader.efi goes something like this: 1) compile to ELF object files 2) generate an ELF executable with -Bsymbolic and a custom linker script that puts everything starting at 0x1000, and also appends some kind of data to the end of symbols (you can find this in sys/boot/i386/efi) 3) use objcopy to convert to PE format (BFD is ia32-efi-app) However, using clang for any of this seems to result in bad jump offsets being generated, which will cause the resulting program to fail. I haven't done a thorough investigation of the issues yet, but I wanted to bring it up to see if anyone has seen something similar, or has any insights. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJP/AsiAAoJENSCzbQ+koZ72N8QAL8zA/0MaHXkLpwTlNiEOZ5m a+73QS2O/uVw/Tsfge/yEcrJdXjGT0YmfmvTEKQPVSmMiZRf8KbG4FQYBKgWTHlO I/Thkw2JRj0iJOlhgp7VyOFpcLHyEdWDsst1D4Y5332j9dEa+JkIqtVTjwefSBbY OcoRkQ9Zznu3vF98BKmn1JTxdKASPMrELs5HMQ3GZop6/FMV8+SBdTFst/gvO1Wg Loe6S2IDMkcaXGYNSBrdqjkJY06wg2oSivlb44/DsSRzQSfKTkSBZ2i3r+LIUv13 cu0XFejjLd2mSPUkSgPGMwTu+PuScGY8Xe8kskJPl+F9NFzxeEdCUbYbpv8HoTJG 3xCXSun5CbkPwfSIfprUS59mAN7sBqWIOzeI5HDeboZv0WL1+7PfUJB27nAINg/D 3MocooMAZHrqsCADlsdgKrodvGp0ccG0vwrfsajho+/69JhNzRbOgllGp2Meqwfy npVBToxVrs7LtcYXkBsyshN3I9GBIjjtR+Ryn5KLCG7xJTvLP0XuYrn4XcNNXjBI ewMRCgUgdlhoS1vPItnmDkYPiIrb5SgowJSZ6Nzd/es7pTdLzRKYXkWzlTNwqY3z TtJLhzebrjfHDArvL2kHvIempyGda+ED4k4W0Ubr8Owzd1WJhRGEhgwVAeJ0hFnO CJOy14wJK32mVr2KFEjG =y2ee -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FFC0B23.1010404>