summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-07-27 21:48:55 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-07-27 21:51:37 -0700
commit6ad9715994e0a6d3c080e5d8f5e4fb8c48925b02 (patch)
treea3d672a430e033b4eac726232a6457b961efade8
parent171fede3520f64b5f6a689a44200f3e09d682565 (diff)
downloadbinutils-6ad9715994e0a6d3c080e5d8f5e4fb8c48925b02.tar.gz
binutils-6ad9715994e0a6d3c080e5d8f5e4fb8c48925b02.tar.xz
binutils-6ad9715994e0a6d3c080e5d8f5e4fb8c48925b02.zip
elf32-i386.c: change R_386_SEG16 to complain_overflow_bitfield
When producing relocatable binaries one sometimes end up with negative offsets which legitimately correspond to negative segment numbers *relative to the load segment address*. For example, in MS-DOS the PSP lives at an offset of -256 corresponding to a (shifted) segment offset of -16. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--bfd/elf32-i386.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 7998286f3f..8ae814d88c 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -148,7 +148,7 @@ static reloc_howto_type elf_howto_table[]=
#define R_386_ext2 (R_386_GOT32X + 1 - R_386_tls_offset)
#define R_386_seg16_offset (R_386_SEG16 - R_386_ext2)
- HOWTO(R_386_SEG16, 4, 1, 16, FALSE, 0, complain_overflow_unsigned,
+ HOWTO(R_386_SEG16, 4, 1, 16, FALSE, 0, complain_overflow_bitfield,
bfd_elf_generic_reloc, "R_386_SEG16",
TRUE, 0xffff, 0xffff, FALSE),
HOWTO(R_386_SUB16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,