diff options
author | Jan Beulich <jbeulich@suse.com> | 2024-11-18 11:35:57 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2024-11-18 11:35:57 +0100 |
commit | d5cbf916be4a049580dfed8682f3f8795e57ecfa (patch) | |
tree | a60232333af3a9bce133fc621b9177d9a0636031 | |
parent | 76445f36a2f9e41b1744d0327e7ec243cb7fac12 (diff) | |
download | binutils-d5cbf916be4a049580dfed8682f3f8795e57ecfa.zip binutils-d5cbf916be4a049580dfed8682f3f8795e57ecfa.tar.gz binutils-d5cbf916be4a049580dfed8682f3f8795e57ecfa.tar.bz2 |
gas/ELF: also reject merge entity size being zero
This won't have any useful effect, so is at best marginally less bogus
than a negative value.
The change actually points out a flawed (for Arm) testcase: @ is a
comment character there.
-rw-r--r-- | binutils/testsuite/binutils-all/debug_str.s | 2 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/binutils/testsuite/binutils-all/debug_str.s b/binutils/testsuite/binutils-all/debug_str.s index 485d0cc..d8dc9c2 100644 --- a/binutils/testsuite/binutils-all/debug_str.s +++ b/binutils/testsuite/binutils-all/debug_str.s @@ -8,5 +8,5 @@ resulting size was gigantic and consequently the library quickly ran out of memory. */ - .section .debug_str,"MS",@progbits,1 + .section .debug_str,"MS",%progbits,1 .string "ZLIB_VER_SUBREVISION 0" diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index d8af4b7..4f09b8d 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -1327,7 +1327,7 @@ obj_elf_section (int push) goto fetch_entsize; entsize = get_absolute_expression (); SKIP_WHITESPACE (); - if (entsize < 0) + if (entsize <= 0) { as_warn (_("invalid merge entity size")); attr &= ~SHF_MERGE; |