diff options
author | Nick Clifton <nickc@redhat.com> | 2023-06-07 14:30:13 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-06-07 14:30:13 +0100 |
commit | 064ad3ea5ecbc30de1eb52a22ac73fea1b5dcc5b (patch) | |
tree | ee7c4a304e1310d176597bb227750fb63b0eb86d /ld | |
parent | dcb16346459f8e08b1e7e5891a056492a8543182 (diff) | |
download | binutils-064ad3ea5ecbc30de1eb52a22ac73fea1b5dcc5b.zip binutils-064ad3ea5ecbc30de1eb52a22ac73fea1b5dcc5b.tar.gz binutils-064ad3ea5ecbc30de1eb52a22ac73fea1b5dcc5b.tar.bz2 |
Add extra linker warning message about discrepancies between normal and common symbols.
PR 30499
bfd * elflink.c (elf_link_add_object_symbols): Add a message indicating that alignment and size discrepancies between the definition of common symbols and normal symbols are serious and should be investigated.
ld * testsuite/ld-elfcomm/elfcomm.exp: Update regexps to match new output from the linker.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elfcomm/elfcomm.exp | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 1acef2a..d722d0b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2023-06-07 Nick Clifton <nickc@redhat.com> + + PR 30499 + * testsuite/ld-elfcomm/elfcomm.exp: Update regexps to match new + output from the linker. + 2023-05-17 Luca Bacci <luca.bacci@outlook.com> PR 30421 diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp index 4a9ffa9..80df9fe 100644 --- a/ld/testsuite/ld-elfcomm/elfcomm.exp +++ b/ld/testsuite/ld-elfcomm/elfcomm.exp @@ -186,13 +186,13 @@ if { [ld_link $ld tmpdir/common1.o $options] } { # This test fails on MIPS because the backend sets type_change_ok. # The size change warning is suppressed. Same on hppa64. if {[istarget mips*-*-*] || [istarget hppa*64*-*-*]} { - if { ![regexp "warning: alignment (\[0-9\]+) of symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o" $link_output] } { + if { ![regexp "warning: alignment (\[0-9\]+) of normal symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 used by the common definition in tmpdir/common1a.o" $link_output] } { fail $test1w1 } else { pass $test1w1 } } else { - if { ![regexp "warning: alignment (\[0-9\]+) of symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o" $link_output] + if { ![regexp "warning: alignment (\[0-9\]+) of normal symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 used by the common definition in tmpdir/common1a.o" $link_output] || ![regexp "warning: size of symbol \`_?foo1\' changed from 2 in tmpdir/common1a.o to 21 in tmpdir/common1b.o" $link_output] } { fail $test1w1 } else { @@ -211,7 +211,7 @@ if { [ld_link $ld tmpdir/common1.o $options] } { return } -if { ![regexp "warning: alignment (\[0-9\]+) of symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o" $link_output] } { +if { ![regexp "warning: alignment (\[0-9\]+) of normal symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 used by the common definition in tmpdir/common1a.o" $link_output] } { fail $test1w2 } else { pass $test1w2 |