Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[build] Add R_X86_64_PLT32 as known reloc target
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@live.com>
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
  • Loading branch information
alive4ever authored and mcb30 committed Jan 16, 2019
1 parent 55cfe8a commit 91be50c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/efireloc.c
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 91be50c

Please sign in to comment.