diff options
author | Michael Brown <mcb30@ipxe.org> | 2017-01-25 08:00:50 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2017-01-25 08:15:21 +0000 |
commit | 941c53a3bf0f0c1c276996e2a68b0fa6263ce410 (patch) | |
tree | b65062cd2028d35d4688cddb61bbe0e4f74a7a0e /src/util | |
parent | bd6255c7be152ea3451dcd6f4175e250bf755f67 (diff) | |
download | ipxe-941c53a3bf0f0c1c276996e2a68b0fa6263ce410.zip ipxe-941c53a3bf0f0c1c276996e2a68b0fa6263ce410.tar.gz ipxe-941c53a3bf0f0c1c276996e2a68b0fa6263ce410.tar.bz2 |
[efi] Fix building elf2efi.c when -fpic is enabled by default
The x86_64 EDK2 headers include a #pragma to mark all subsequent
symbol declarations and references as hidden if position-independent
code is being generated. Since libgen.h is currently included only
after the EDK2 headers, this results in __xpg_basename() being
erroneously marked as having hidden visibility (if the compiler
defaults to building position-independent code); this eventually
results in a failure to link the elf2efi binary.
Fix by including libgen.h prior to including the EDK2 headers.
Originally-fixed-by: Doug Goldstein <cardoe@cardoe.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/elf2efi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index 152bf53..27f37d9 100644 --- a/src/util/elf2efi.c +++ b/src/util/elf2efi.c @@ -32,9 +32,9 @@ #include <sys/mman.h> #include <fcntl.h> #include <elf.h> +#include <libgen.h> #include <ipxe/efi/Uefi.h> #include <ipxe/efi/IndustryStandard/PeImage.h> -#include <libgen.h> #define eprintf(...) fprintf ( stderr, __VA_ARGS__ ) |