diff options
author | Tamar Christina <tamar.christina@arm.com> | 2020-04-21 15:16:21 +0100 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2020-04-21 15:17:18 +0100 |
commit | c36876fe5b5bac1c404ab2ca82bfbfb2ed9a2717 (patch) | |
tree | 4b3429655b130049683dd52267c000d246f408c5 /gas/testsuite | |
parent | 39a7b38fac0e6e90baa3d661a271377db3ba1765 (diff) | |
download | gdb-c36876fe5b5bac1c404ab2ca82bfbfb2ed9a2717.zip gdb-c36876fe5b5bac1c404ab2ca82bfbfb2ed9a2717.tar.gz gdb-c36876fe5b5bac1c404ab2ca82bfbfb2ed9a2717.tar.bz2 |
BFD: Exclude sections with no content from compress check.
The check in bfd_get_full_section_contents is trying to check that we don't
allocate more space for a section than the size of the section is on disk.
Previously we excluded linker created sections since they didn't have a size on
disk. However we also need to exclude sections with no content as well such as
the BSS section. Space for these would not have been allocated by the assembler
and so the check would incorrectly fail.
bfd/ChangeLog:
PR binutils/24753
* compress.c (bfd_get_full_section_contents): Exclude sections with no
content.
gas/ChangeLog:
PR binutils/24753
* testsuite/gas/arm/pr24753.d: New test.
* testsuite/gas/arm/pr24753.s: New test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/arm/pr24753.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/pr24753.s | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gas/testsuite/gas/arm/pr24753.d b/gas/testsuite/gas/arm/pr24753.d new file mode 100644 index 0000000..01990d1 --- /dev/null +++ b/gas/testsuite/gas/arm/pr24753.d @@ -0,0 +1,7 @@ +#skip: *-*-pe *-*-wince *-*-vxworks +#objdump: -d +#name: PR24753: Don't error on sections with no content size mismatch with file + +.*: +file format .*arm.* + +#... diff --git a/gas/testsuite/gas/arm/pr24753.s b/gas/testsuite/gas/arm/pr24753.s new file mode 100644 index 0000000..5ba33fd --- /dev/null +++ b/gas/testsuite/gas/arm/pr24753.s @@ -0,0 +1,12 @@ +.text +.global _start +_start: + nop + +.section .text2, "ax", %progbits +_func: + nop + +.bss +.fill 0x8000 + |