mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-01 13:26:47 +08:00
There is some inconsistency between the behaviour of objdump -D and objdump -s, both supposedly operating on all sections by default. objdump -s ignores bss sections, while objdump -D dissassembles the zeros. Fix this by making objdump -D ignore bss sections too. Furthermore, "objdump -s -j .bss" doesn't dump .bss as it should, since the user is specifically asking to look at all those zeros. This change does find some tests that used objdump -D with expected output in bss-style sections. I've updated all the msp430 tests that just wanted to find a non-empty section to look at section headers instead, making the tests slightly more stringent. The ppc xcoff and spu tests are fixed by adding -j options to objdump, which makes the tests somewhat more lenient. binutils/ * objdump.c (disassemble_section): Ignore sections without contents, unless overridden by -j. (dump_section): Allow -j to override the default of not displaying sections without contents. * doc/binutils.texi (objdump options): Update -D, -s and -j description. gas/ * testsuite/gas/ppc/xcoff-tls-32.d: Select wanted objdump sections with -j. * testsuite/gas/ppc/xcoff-tls-64.d: Likewise. ld/ * testsuite/ld-msp430-elf/main-bss-lower.d, * testsuite/ld-msp430-elf/main-bss-upper.d, * testsuite/ld-msp430-elf/main-const-lower.d, * testsuite/ld-msp430-elf/main-const-upper.d, * testsuite/ld-msp430-elf/main-text-lower.d, * testsuite/ld-msp430-elf/main-text-upper.d, * testsuite/ld-msp430-elf/main-var-lower.d, * testsuite/ld-msp430-elf/main-var-upper.d: Expect -wh output. * testsuite/ld-msp430-elf/msp430-elf.exp: Use objdump -wh rather than objdump -D or objdump -d with tests checking for non-empty given sections. * testsuite/ld-spu/ear.d, * testsuite/ld-spu/icache1.d, * testsuite/ld-spu/ovl.d, * testsuite/ld-spu/ovl2.d: Select wanted objdump sections. |
||
---|---|---|
.. | ||
attr-gnu-main.s | ||
attr-gnu-obj.s | ||
attr-gnu-region-lower-upper.d | ||
attr-gnu-region-lower.d | ||
attr-gnu-region-upper.d | ||
finiarray-warn.ld | ||
finiarray-warn.r | ||
initarray-nowarn.ld | ||
initarray-nowarn.r | ||
initarray-warn.ld | ||
initarray-warn.r | ||
initarray.s | ||
main-bss-lower.d | ||
main-bss-upper.d | ||
main-const-lower.d | ||
main-const-upper.d | ||
main-text-lower.d | ||
main-text-upper.d | ||
main-var-lower.d | ||
main-var-upper.d | ||
main-with-data-bss-unique-sec.s | ||
main-with-data-bss.s | ||
main-with-text-rodata-unique-sec.s | ||
main-with-text-rodata.s | ||
msp430-elf.exp | ||
msp430-no-lower.ld | ||
msp430-tiny-ram.ld | ||
msp430-tiny-rom.ld | ||
msp430.ld | ||
preinitarray-warn.ld | ||
preinitarray-warn.r | ||
reloc-lo-430x.s | ||
uleb128_430.d | ||
uleb128_430x.d | ||
uleb128.s | ||
upper-input-sections.s | ||
valid-map-foo.s | ||
valid-map.d | ||
valid-map.map | ||
valid-map.s | ||
warn-no-lower-code.r | ||
warn-no-lower-data.r | ||
warn-no-lower.r | ||
warn-no-lower.s |