[ipxe-devel] [PATCH] wimboot: Add R_X86_64_PLT32 as known reloc target
Alif M. Ahmad
alive4ever at live.com
Mon Dec 17 03:18:35 UTC 2018
According to a discussion on ipxe mailing list[1], binutils 2.31.0
generates R_X86_64_PLT32 instead of R_X86_64_PC32.
This change fixes building wimboot on systems with binutils >= 2.31.0
[1] http://lists.ipxe.org/pipermail/ipxe-devel/2018-August/006255.html
Signed-off-by: Alif M. Ahmad <alive4ever at live.com>
---
src/efireloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/efireloc.c b/src/efireloc.c
index 519dd75..e0736cd 100644
--- a/src/efireloc.c
+++ b/src/efireloc.c
@@ -326,7 +326,8 @@ static void process_reloc ( bfd *bfd __unused, asection *section, arelent *rel,
/* Generate a 2-byte PE relocation */
generate_pe_reloc ( pe_reltab, offset, 2 );
} else if ( ( strcmp ( howto->name, "R_386_PC32" ) == 0 ) ||
- ( strcmp ( howto->name, "R_X86_64_PC32" ) == 0 ) ) {
+ ( strcmp ( howto->name, "R_X86_64_PC32" ) == 0 ) ||
+ ( strcmp ( howto->name, "R_X86_64_PLT32" ) == 0 ) ) {
/* Skip PC-relative relocations; all relative offsets
* remain unaltered when the object is loaded.
*/
--
2.20.1
More information about the ipxe-devel
mailing list