From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 6B6F2385B50B; Sat, 11 Feb 2023 06:14:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B6F2385B50B Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] objdump -D of bss sections and -s with -j X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 480ddaa9784c652b7c575e17799e0408ac4e5b01 X-Git-Newrev: 0a3137ce4c4b38ee8b26c09824633b827fed4cb1 Message-Id: <20230211061429.6B6F2385B50B@sourceware.org> Date: Sat, 11 Feb 2023 06:14:29 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2023 06:14:29 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D0a3137ce4c4b= 38ee8b26c09824633b827fed4cb1 commit 0a3137ce4c4b38ee8b26c09824633b827fed4cb1 Author: Alan Modra Date: Sat Feb 11 08:36:24 2023 +1030 objdump -D of bss sections and -s with -j =20 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. =20 Furthermore, "objdump -s -j .bss" doesn't dump .bss as it should, since the user is specifically asking to look at all those zeros. =20 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. =20 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. Diff: --- binutils/doc/binutils.texi | 13 +++-- binutils/objdump.c | 29 ++++++---- gas/testsuite/gas/ppc/xcoff-tls-32.d | 2 +- gas/testsuite/gas/ppc/xcoff-tls-64.d | 2 +- ld/testsuite/ld-msp430-elf/main-bss-lower.d | 2 +- ld/testsuite/ld-msp430-elf/main-bss-upper.d | 2 +- ld/testsuite/ld-msp430-elf/main-const-lower.d | 2 +- ld/testsuite/ld-msp430-elf/main-const-upper.d | 2 +- ld/testsuite/ld-msp430-elf/main-text-lower.d | 2 +- ld/testsuite/ld-msp430-elf/main-text-upper.d | 7 +-- ld/testsuite/ld-msp430-elf/main-var-lower.d | 2 +- ld/testsuite/ld-msp430-elf/main-var-upper.d | 2 +- ld/testsuite/ld-msp430-elf/msp430-elf.exp | 80 +++++++++++++----------= ---- ld/testsuite/ld-spu/ear.d | 2 +- ld/testsuite/ld-spu/icache1.d | 2 +- ld/testsuite/ld-spu/ovl.d | 2 +- ld/testsuite/ld-spu/ovl2.d | 2 +- 17 files changed, 80 insertions(+), 75 deletions(-) diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 514f8af6438..b1982a95704 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -2407,8 +2407,9 @@ used when disassembling. =20 @item -D @itemx --disassemble-all -Like @option{-d}, but disassemble the contents of all sections, not just -those expected to contain instructions. +Like @option{-d}, but disassemble the contents of all non-empty +non-bss sections, not just those expected to contain instructions. +@option{-j} may be used to select specific sections. =20 This option also has a subtle effect on the disassembly of instructions in code sections. When option @option{-d} is in effect @@ -2502,7 +2503,8 @@ for specification with @option{-b} or @option{-m}. @item -j @var{name} @itemx --section=3D@var{name} @cindex section information -Display information only for section @var{name}. +Display information for section @var{name}. This option may be +specified multiple times. =20 @item -L @itemx --process-links @@ -2775,8 +2777,9 @@ disassembly. @itemx --full-contents @cindex sections, full contents @cindex object file sections -Display the full contents of any sections requested. By default all -non-empty sections are displayed. +Display the full contents of sections, often used in combination with +@option{-j} to request specific sections. By default all non-empty +non-bss sections are displayed. =20 @item -S @itemx --source diff --git a/binutils/objdump.c b/binutils/objdump.c index 4292c23a9ab..9dd1ebd4da0 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -3685,15 +3685,18 @@ disassemble_section (bfd *abfd, asection *section, = void *inf) next_sym } loop_until; =20 - /* Sections that do not contain machine - code are not normally disassembled. */ - if (! disassemble_all - && only_list =3D=3D NULL - && ((section->flags & (SEC_CODE | SEC_HAS_CONTENTS)) - !=3D (SEC_CODE | SEC_HAS_CONTENTS))) - return; + if (only_list =3D=3D NULL) + { + /* Sections that do not contain machine + code are not normally disassembled. */ + if ((section->flags & SEC_HAS_CONTENTS) =3D=3D 0) + return; =20 - if (! process_section_p (section)) + if (! disassemble_all + && (section->flags & SEC_CODE) =3D=3D 0) + return; + } + else if (!process_section_p (section)) return; =20 datasize =3D bfd_section_size (section); @@ -4970,10 +4973,12 @@ dump_section (bfd *abfd, asection *section, void *d= ummy ATTRIBUTE_UNUSED) int count; int width; =20 - if (! process_section_p (section)) - return; - - if ((section->flags & SEC_HAS_CONTENTS) =3D=3D 0) + if (only_list =3D=3D NULL) + { + if ((section->flags & SEC_HAS_CONTENTS) =3D=3D 0) + return; + } + else if (!process_section_p (section)) return; =20 if ((datasize =3D bfd_section_size (section)) =3D=3D 0) diff --git a/gas/testsuite/gas/ppc/xcoff-tls-32.d b/gas/testsuite/gas/ppc/x= coff-tls-32.d index eb71df09e41..c20e01c410c 100644 --- a/gas/testsuite/gas/ppc/xcoff-tls-32.d +++ b/gas/testsuite/gas/ppc/xcoff-tls-32.d @@ -1,6 +1,6 @@ #as: -a32 #source: xcoff-tls.s -#objdump: -Dr +#objdump: -Dr -j.data -j.tdata -j.tbss #name: XCOFF TLS relocation (32 bit) =20 .* diff --git a/gas/testsuite/gas/ppc/xcoff-tls-64.d b/gas/testsuite/gas/ppc/x= coff-tls-64.d index 7f3b6ebceb6..f24f89ecec2 100644 --- a/gas/testsuite/gas/ppc/xcoff-tls-64.d +++ b/gas/testsuite/gas/ppc/xcoff-tls-64.d @@ -1,6 +1,6 @@ #as: -a64 #source: xcoff-tls.s -#objdump: -Dr +#objdump: -Dr -j.data -j.tdata -j.tbss #name: XCOFF TLS relocation (64 bit) =20 .* diff --git a/ld/testsuite/ld-msp430-elf/main-bss-lower.d b/ld/testsuite/ld-= msp430-elf/main-bss-lower.d index 60074209e9d..489dddbe8d6 100644 --- a/ld/testsuite/ld-msp430-elf/main-bss-lower.d +++ b/ld/testsuite/ld-msp430-elf/main-bss-lower.d @@ -1,3 +1,3 @@ #... -Disassembly of section .lower.bss: +.* \.lower\.bss +0+14 .* #pass diff --git a/ld/testsuite/ld-msp430-elf/main-bss-upper.d b/ld/testsuite/ld-= msp430-elf/main-bss-upper.d index 2f6376a7b65..ad410e5b576 100644 --- a/ld/testsuite/ld-msp430-elf/main-bss-upper.d +++ b/ld/testsuite/ld-msp430-elf/main-bss-upper.d @@ -1,3 +1,3 @@ #... -Disassembly of section .upper.bss: +.* \.upper\.bss +0+14 .* #pass diff --git a/ld/testsuite/ld-msp430-elf/main-const-lower.d b/ld/testsuite/l= d-msp430-elf/main-const-lower.d index 8549961bf4f..0b639dac37b 100644 --- a/ld/testsuite/ld-msp430-elf/main-const-lower.d +++ b/ld/testsuite/ld-msp430-elf/main-const-lower.d @@ -1,3 +1,3 @@ #... -Disassembly of section .lower.rodata: +.* \.lower\.rodata +0+14 .* #pass diff --git a/ld/testsuite/ld-msp430-elf/main-const-upper.d b/ld/testsuite/l= d-msp430-elf/main-const-upper.d index c84d649c4e0..7dd078dd1bd 100644 --- a/ld/testsuite/ld-msp430-elf/main-const-upper.d +++ b/ld/testsuite/ld-msp430-elf/main-const-upper.d @@ -1,3 +1,3 @@ #... -Disassembly of section .upper.rodata: +.* \.upper\.rodata +0+14 .* #pass diff --git a/ld/testsuite/ld-msp430-elf/main-text-lower.d b/ld/testsuite/ld= -msp430-elf/main-text-lower.d index 446a305a22c..9f3442c362b 100644 --- a/ld/testsuite/ld-msp430-elf/main-text-lower.d +++ b/ld/testsuite/ld-msp430-elf/main-text-lower.d @@ -1,3 +1,3 @@ #... -Disassembly of section .lower.text: +.* \.lower\.text +0+38 .* #pass diff --git a/ld/testsuite/ld-msp430-elf/main-text-upper.d b/ld/testsuite/ld= -msp430-elf/main-text-upper.d index f7ae6af2701..712f5486c57 100644 --- a/ld/testsuite/ld-msp430-elf/main-text-upper.d +++ b/ld/testsuite/ld-msp430-elf/main-text-upper.d @@ -1,6 +1,3 @@ - -.*: file format.*msp430.* - - -Disassembly of section .upper.text: #... +.* \.upper\.text +0+38 .* +#pass diff --git a/ld/testsuite/ld-msp430-elf/main-var-lower.d b/ld/testsuite/ld-= msp430-elf/main-var-lower.d index f520cf5676d..7f214b53793 100644 --- a/ld/testsuite/ld-msp430-elf/main-var-lower.d +++ b/ld/testsuite/ld-msp430-elf/main-var-lower.d @@ -1,3 +1,3 @@ #... -Disassembly of section .lower.data: +.* \.lower\.data +0+14 .* #pass diff --git a/ld/testsuite/ld-msp430-elf/main-var-upper.d b/ld/testsuite/ld-= msp430-elf/main-var-upper.d index fc3d712c87a..9443f705585 100644 --- a/ld/testsuite/ld-msp430-elf/main-var-upper.d +++ b/ld/testsuite/ld-msp430-elf/main-var-upper.d @@ -1,3 +1,3 @@ #... -Disassembly of section .upper.data: +.* \.upper\.data +0+14 .* #pass diff --git a/ld/testsuite/ld-msp430-elf/msp430-elf.exp b/ld/testsuite/ld-ms= p430-elf/msp430-elf.exp index 89c7f3951bc..0e1a1c94622 100644 --- a/ld/testsuite/ld-msp430-elf/msp430-elf.exp +++ b/ld/testsuite/ld-msp430-elf/msp430-elf.exp @@ -49,106 +49,106 @@ if { ![istarget "msp430*elf*"] } { =20 set msp430regionprefixtests { {"Move main() to .upper.text" "-T msp430.ld --code-region=3Dupper" - "" "" {main-with-text-rodata.s} {{objdump -d main-text-upper.d}} "main= -upper"} + "" "" {main-with-text-rodata.s} {{objdump -wh main-text-upper.d}} "mai= n-upper"} {"Move main() to .upper.text. No .lower.text in ld script" "-T msp430-no= -lower.ld --code-region=3Dupper" - "" "" {main-with-text-rodata.s} {{objdump -d main-text-upper.d}} "main= -upper"} + "" "" {main-with-text-rodata.s} {{objdump -wh main-text-upper.d}} "mai= n-upper"} {"Move main() to .lower.text" "-T msp430.ld --code-region=3Dlower" - "" "" {main-with-text-rodata.s} {{objdump -d main-text-lower.d}} "main= -lower"} + "" "" {main-with-text-rodata.s} {{objdump -wh main-text-lower.d}} "mai= n-lower"} {"Move \"either\" main() to .lower.text" "-T msp430.ld --code-region=3De= ither" - "" "" {main-with-text-rodata.s} {{objdump -d main-text-lower.d}} "main= -either"} + "" "" {main-with-text-rodata.s} {{objdump -wh main-text-lower.d}} "mai= n-either"} =20 {"Move glob_var to .upper.data" "-T msp430.ld --data-region=3Dupper" - "" "" {main-with-data-bss.s} {{objdump -D main-var-upper.d}} "main-var= -upper"} + "" "" {main-with-data-bss.s} {{objdump -wh main-var-upper.d}} "main-va= r-upper"} {"Move glob_var to .upper.data. No .lower.data in ld script" "-T msp430-= no-lower.ld --data-region=3Dupper" - "" "" {main-with-data-bss.s} {{objdump -D main-var-upper.d}} "main-var= -upper"} + "" "" {main-with-data-bss.s} {{objdump -wh main-var-upper.d}} "main-va= r-upper"} {"Move glob_var to .lower.data" "-T msp430.ld --data-region=3Dlower" - "" "" {main-with-data-bss.s} {{objdump -D main-var-lower.d}} "main-var= -lower"} + "" "" {main-with-data-bss.s} {{objdump -wh main-var-lower.d}} "main-va= r-lower"} {"Move \"either\" glob_var to .lower.data" "-T msp430.ld --data-region= =3Dlower" - "" "" {main-with-data-bss.s} {{objdump -D main-var-lower.d}} "main-var= -lower"} + "" "" {main-with-data-bss.s} {{objdump -wh main-var-lower.d}} "main-va= r-lower"} =20 {"Move glob_zero to .upper.bss" "-T msp430.ld --data-region=3Dupper" - "" "" {main-with-data-bss.s} {{objdump -D main-bss-upper.d}} "main-bss= -upper"} + "" "" {main-with-data-bss.s} {{objdump -wh main-bss-upper.d}} "main-bs= s-upper"} {"Move glob_zero to .upper.bss. No .lower.bss in ld script." "-T msp430-= no-lower.ld --data-region=3Dupper" - "" "" {main-with-data-bss.s} {{objdump -D main-bss-upper.d}} "main-bss= -upper"} + "" "" {main-with-data-bss.s} {{objdump -wh main-bss-upper.d}} "main-bs= s-upper"} {"Move glob_zero to .lower.bss" "-T msp430.ld --data-region=3Dlower" - "" "" {main-with-data-bss.s} {{objdump -D main-bss-lower.d}} "main-bss= -lower"} + "" "" {main-with-data-bss.s} {{objdump -wh main-bss-lower.d}} "main-bs= s-lower"} {"Move \"either\" glob_zero to .lower.bss" "-T msp430.ld --data-region= =3Dlower" - "" "" {main-with-data-bss.s} {{objdump -D main-bss-lower.d}} "main-bss= -lower"} + "" "" {main-with-data-bss.s} {{objdump -wh main-bss-lower.d}} "main-bs= s-lower"} =20 {"Move glob_const to .upper.rodata" "-T msp430.ld --data-region=3Dupper" - "" "" {main-with-text-rodata.s} {{objdump -D main-const-upper.d}} "mai= n-const-upper"} + "" "" {main-with-text-rodata.s} {{objdump -wh main-const-upper.d}} "ma= in-const-upper"} {"Move glob_const to .upper.rodata. No .lower.rodata in ld script." "-T = msp430-no-lower.ld --data-region=3Dupper" - "" "" {main-with-text-rodata.s} {{objdump -D main-const-upper.d}} "mai= n-const-upper"} + "" "" {main-with-text-rodata.s} {{objdump -wh main-const-upper.d}} "ma= in-const-upper"} {"Move glob_const to .lower.rodata" "-T msp430.ld --data-region=3Dlower" - "" "" {main-with-text-rodata.s} {{objdump -D main-const-lower.d}} "mai= n-const-lower"} + "" "" {main-with-text-rodata.s} {{objdump -wh main-const-lower.d}} "ma= in-const-lower"} {"Move \"either\" glob_const to .lower.rodata" "-T msp430.ld --data-regi= on=3Dlower" - "" "" {main-with-text-rodata.s} {{objdump -D main-const-lower.d}} "mai= n-const-lower"} + "" "" {main-with-text-rodata.s} {{objdump -wh main-const-lower.d}} "ma= in-const-lower"} } =20 set msp430regionprefixuniquesectiontests { {"Move main() to .upper.text, with -ffunction/data-sections" "-T msp430.= ld --code-region=3Dupper" - "" "" {main-with-text-rodata-unique-sec.s} {{objdump -d main-text-uppe= r.d}} "main-upper"} + "" "" {main-with-text-rodata-unique-sec.s} {{objdump -wh main-text-upp= er.d}} "main-upper"} {"Move main() to .upper.text. No .lower.text in ld script, with -ffuncti= on/data-sections" "-T msp430-no-lower.ld --code-region=3Dupper" - "" "" {main-with-text-rodata-unique-sec.s} {{objdump -d main-text-uppe= r.d}} "main-upper"} + "" "" {main-with-text-rodata-unique-sec.s} {{objdump -wh main-text-upp= er.d}} "main-upper"} {"Move main() to .lower.text, with -ffunction/data-sections" "-T msp430.= ld --code-region=3Dlower" - "" "" {main-with-text-rodata-unique-sec.s} {{objdump -d main-text-lowe= r.d}} "main-lower"} + "" "" {main-with-text-rodata-unique-sec.s} {{objdump -wh main-text-low= er.d}} "main-lower"} {"Move \"either\" main() to .lower.text, with -ffunction/data-sections" = "-T msp430.ld --code-region=3Deither" - "" "" {main-with-text-rodata-unique-sec.s} {{objdump -d main-text-lowe= r.d}} "main-either"} + "" "" {main-with-text-rodata-unique-sec.s} {{objdump -wh main-text-low= er.d}} "main-either"} =20 {"Move glob_var to .upper.data, with -ffunction/data-sections" "-T msp43= 0.ld --data-region=3Dupper" - "" "" {main-with-data-bss-unique-sec.s} {{objdump -D main-var-upper.d}= } "main-var-upper"} + "" "" {main-with-data-bss-unique-sec.s} {{objdump -wh main-var-upper.d= }} "main-var-upper"} {"Move glob_var to .upper.data. No .lower.data in ld script, with -ffunc= tion/data-sections" "-T msp430-no-lower.ld --data-region=3Dupper" - "" "" {main-with-data-bss-unique-sec.s} {{objdump -D main-var-upper.d}= } "main-var-upper"} + "" "" {main-with-data-bss-unique-sec.s} {{objdump -wh main-var-upper.d= }} "main-var-upper"} {"Move glob_var to .lower.data, with -ffunction/data-sections" "-T msp43= 0.ld --data-region=3Dlower" - "" "" {main-with-data-bss-unique-sec.s} {{objdump -D main-var-lower.d}= } "main-var-lower"} + "" "" {main-with-data-bss-unique-sec.s} {{objdump -wh main-var-lower.d= }} "main-var-lower"} {"Move \"either\" glob_var to .lower.data, with -ffunction/data-sections= " "-T msp430.ld --data-region=3Dlower" - "" "" {main-with-data-bss-unique-sec.s} {{objdump -D main-var-lower.d}= } "main-var-lower"} + "" "" {main-with-data-bss-unique-sec.s} {{objdump -wh main-var-lower.d= }} "main-var-lower"} =20 {"Move glob_zero to .upper.bss, with -ffunction/data-sections" "-T msp43= 0.ld --data-region=3Dupper" - "" "" {main-with-data-bss-unique-sec.s} {{objdump -D main-bss-upper.d}= } "main-bss-upper"} + "" "" {main-with-data-bss-unique-sec.s} {{objdump -wh main-bss-upper.d= }} "main-bss-upper"} {"Move glob_zero to .upper.bss. No .lower.bss in ld script., with -ffunc= tion/data-sections" "-T msp430-no-lower.ld --data-region=3Dupper" - "" "" {main-with-data-bss-unique-sec.s} {{objdump -D main-bss-upper.d}= } "main-bss-upper"} + "" "" {main-with-data-bss-unique-sec.s} {{objdump -wh main-bss-upper.d= }} "main-bss-upper"} {"Move glob_zero to .lower.bss, with -ffunction/data-sections" "-T msp43= 0.ld --data-region=3Dlower" - "" "" {main-with-data-bss-unique-sec.s} {{objdump -D main-bss-lower.d}= } "main-bss-lower"} + "" "" {main-with-data-bss-unique-sec.s} {{objdump -wh main-bss-lower.d= }} "main-bss-lower"} {"Move \"either\" glob_zero to .lower.bss, with -ffunction/data-sections= " "-T msp430.ld --data-region=3Dlower" - "" "" {main-with-data-bss-unique-sec.s} {{objdump -D main-bss-lower.d}= } "main-bss-lower"} + "" "" {main-with-data-bss-unique-sec.s} {{objdump -wh main-bss-lower.d= }} "main-bss-lower"} =20 {"Move glob_const to .upper.rodata, with -ffunction/data-sections" "-T m= sp430.ld --data-region=3Dupper" - "" "" {main-with-text-rodata-unique-sec.s} {{objdump -D main-const-upp= er.d}} "main-const-upper"} + "" "" {main-with-text-rodata-unique-sec.s} {{objdump -wh main-const-up= per.d}} "main-const-upper"} {"Move glob_const to .upper.rodata. No .lower.rodata in ld script., with= -ffunction/data-sections" "-T msp430-no-lower.ld --data-region=3Dupper" - "" "" {main-with-text-rodata-unique-sec.s} {{objdump -D main-const-upp= er.d}} "main-const-upper"} + "" "" {main-with-text-rodata-unique-sec.s} {{objdump -wh main-const-up= per.d}} "main-const-upper"} {"Move glob_const to .lower.rodata, with -ffunction/data-sections" "-T m= sp430.ld --data-region=3Dlower" - "" "" {main-with-text-rodata-unique-sec.s} {{objdump -D main-const-low= er.d}} "main-const-lower"} + "" "" {main-with-text-rodata-unique-sec.s} {{objdump -wh main-const-lo= wer.d}} "main-const-lower"} {"Move \"either\" glob_const to .lower.rodata, with -ffunction/data-sect= ions" "-T msp430.ld --data-region=3Dlower" - "" "" {main-with-text-rodata-unique-sec.s} {{objdump -D main-const-low= er.d}} "main-const-lower"} + "" "" {main-with-text-rodata-unique-sec.s} {{objdump -wh main-const-lo= wer.d}} "main-const-lower"} } =20 set msp430eithershuffletests { {"Move \"either\" main() to .upper.text when it doesn\'t fit in .lower.t= ext" "-T msp430-tiny-rom.ld --code-region=3Deither --data-region=3Deither" = "" "" {main-with-text-rodata.s} - {{objdump -d main-text-upper.d}} "either-to-upper-text"} + {{objdump -wh main-text-upper.d}} "either-to-upper-text"} {"Move \"either\" glob_var_array to .upper.data when it doesn\'t fit in = .lower.data" "-T msp430-tiny-ram.ld --data-region=3Deither" "" "" {main-with-data-b= ss.s} - {{objdump -D main-var-upper.d}} "either-to-upper-data"} + {{objdump -wh main-var-upper.d}} "either-to-upper-data"} {"Move \"either\" glob_bss_array to .upper.bss when it doesn\'t fit in .= lower.bss" "-T msp430-tiny-ram.ld --data-region=3Deither" "" "" {main-with-data-b= ss.s} - {{objdump -D main-bss-upper.d}} "either-to-upper-bss"} + {{objdump -wh main-bss-upper.d}} "either-to-upper-bss"} {"Move \"either\" glob_const_array to .upper.rodata when it doesn\'t fit= in .lower.rodata" "-T msp430-tiny-rom.ld --code-region=3Deither --data-region=3Deither" = "" "" {main-with-text-rodata.s} - {{objdump -D main-const-upper.d}} "either-to-upper-const"} + {{objdump -wh main-const-upper.d}} "either-to-upper-const"} =20 {"Move \"either\" main() to .upper.text when it doesn\'t fit in .lower.t= ext, with -ffunction/data-sections" "-T msp430-tiny-rom.ld --code-region=3Deither --data-region=3Deither" = "" "" {main-with-text-rodata-unique-sec.s} - {{objdump -d main-text-upper.d}} "either-to-upper-text-unique-sec"} + {{objdump -wh main-text-upper.d}} "either-to-upper-text-unique-sec"} {"Move \"either\" glob_var_array to .upper.data when it doesn\'t fit in = .lower.data, with -ffunction/data-sections" "-T msp430-tiny-ram.ld --data-region=3Deither" "" "" {main-with-data-b= ss-unique-sec.s} - {{objdump -D main-var-upper.d}} "either-to-upper-data-unique-sec"} + {{objdump -wh main-var-upper.d}} "either-to-upper-data-unique-sec"} {"Move \"either\" glob_bss_array to .upper.bss when it doesn\'t fit in .= lower.bss, with -ffunction/data-sections" "-T msp430-tiny-ram.ld --data-region=3Deither" "" "" {main-with-data-b= ss-unique-sec.s} - {{objdump -D main-bss-upper.d}} "either-to-upper-bss-unique-sec"} + {{objdump -wh main-bss-upper.d}} "either-to-upper-bss-unique-sec"} {"Move \"either\" glob_const_array to .upper.rodata when it doesn\'t fit= in .lower.rodata, with -ffunction/data-sections" "-T msp430-tiny-rom.ld --code-region=3Deither --data-region=3Deither" = "" "" {main-with-text-rodata-unique-sec.s} - {{objdump -D main-const-upper.d}} "either-to-upper-const-unique-sec"} + {{objdump -wh main-const-upper.d}} "either-to-upper-const-unique-sec"} } =20 set msp430warntests { diff --git a/ld/testsuite/ld-spu/ear.d b/ld/testsuite/ld-spu/ear.d index df5546fb60f..8c6435e5366 100644 --- a/ld/testsuite/ld-spu/ear.d +++ b/ld/testsuite/ld-spu/ear.d @@ -1,5 +1,5 @@ #as: -#objdump: -Dr +#objdump: -Dr -j.text -j.data -j.toe -j.data.blah #name: ear =20 .*: +file format .* diff --git a/ld/testsuite/ld-spu/icache1.d b/ld/testsuite/ld-spu/icache1.d index 27dc99e41be..a4c8c5a5bfe 100644 --- a/ld/testsuite/ld-spu/icache1.d +++ b/ld/testsuite/ld-spu/icache1.d @@ -1,6 +1,6 @@ #source: icache1.s #ld: --soft-icache --num-lines=3D4 --non-ia-text --auto-overlay=3Dtmpdir/i= cache1.lnk --auto-relink -#objdump: -D +#objdump: -D -j.text -j.data -j.bss -j.ovl.init -j.ovly1 -j.ovly2 -j.ovly3= -j.ovly4 -j.ovly5 -j.ovly6 -j.ovly7 -j.ovly8 =20 .* elf32-spu =20 diff --git a/ld/testsuite/ld-spu/ovl.d b/ld/testsuite/ld-spu/ovl.d index cbf7573a642..a0372a0e2fd 100644 --- a/ld/testsuite/ld-spu/ovl.d +++ b/ld/testsuite/ld-spu/ovl.d @@ -1,6 +1,6 @@ #source: ovl.s #ld: -N -T ovl1.lnk -T ovl.lnk --emit-relocs -#objdump: -D -r +#objdump: -D -r -j.text -j.ov_a1 -j.ov_a2 -j.data -j.toe -j.note.spu_name =20 .*elf32-spu =20 diff --git a/ld/testsuite/ld-spu/ovl2.d b/ld/testsuite/ld-spu/ovl2.d index b1e344c456a..b8570c069d1 100644 --- a/ld/testsuite/ld-spu/ovl2.d +++ b/ld/testsuite/ld-spu/ovl2.d @@ -1,6 +1,6 @@ #source: ovl2.s #ld: -N -T ovl2.lnk -T ovl.lnk --emit-relocs -#objdump: -D -r +#objdump: -D -r -j.text -j.ov_a1 -j.ov_a2 -j.data -j.toe -j.nonalloc -j.no= te.spu_name =20 .*elf32-spu