mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 11:01:35 +08:00
Check .gnu.warning section in shared library
PR ld/15762 * ld-elf/shared.exp (build_tests): Check .gnu.warning section in the libbarw.so library. * ld-elf/libbarw.rd: New. * lib/ld-lib.exp (run_cc_link_tests): Support checking on output with warning message.
This commit is contained in:
@ -1,4 +1,14 @@
|
|||||||
* 2013-07-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
2013-07-24 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR ld/15762
|
||||||
|
* ld-elf/shared.exp (build_tests): Check .gnu.warning section
|
||||||
|
in the libbarw.so library.
|
||||||
|
* ld-elf/libbarw.rd: New.
|
||||||
|
|
||||||
|
* lib/ld-lib.exp (run_cc_link_tests): Support checking on
|
||||||
|
output with warning message.
|
||||||
|
|
||||||
|
2013-07-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
* ld-scripts/script.exp: Use run_dump_test instead of
|
* ld-scripts/script.exp: Use run_dump_test instead of
|
||||||
ld_simple_link to check the error message.
|
ld_simple_link to check the error message.
|
||||||
|
3
ld/testsuite/ld-elf/libbarw.rd
Normal file
3
ld/testsuite/ld-elf/libbarw.rd
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#...
|
||||||
|
\[[ 0-9]+\] \.gnu.warning.foo[ \t]+PROGBITS[ \t0-9a-f]+.*
|
||||||
|
#pass
|
@ -50,7 +50,7 @@ set build_tests {
|
|||||||
{begin.c end.c} {} "libbar.so"}
|
{begin.c end.c} {} "libbar.so"}
|
||||||
{"Build warn libbar.so"
|
{"Build warn libbar.so"
|
||||||
"-shared" "-fPIC"
|
"-shared" "-fPIC"
|
||||||
{beginwarn.c end.c} {} "libbarw.so"
|
{beginwarn.c end.c} {{readelf {-S --wide} libbarw.rd}} "libbarw.so"
|
||||||
"C" "^.*\\\): warning: function foo is deprecated$"}
|
"C" "^.*\\\): warning: function foo is deprecated$"}
|
||||||
{"Build hidden libbar.so"
|
{"Build hidden libbar.so"
|
||||||
"-shared" "-fPIC"
|
"-shared" "-fPIC"
|
||||||
|
@ -1424,7 +1424,7 @@ proc run_cc_link_tests { ldtests } {
|
|||||||
if { $warnings != "" } then {
|
if { $warnings != "" } then {
|
||||||
verbose -log "returned with: <$exec_output>, expected: <$warnings>"
|
verbose -log "returned with: <$exec_output>, expected: <$warnings>"
|
||||||
if { [regexp $warnings $exec_output] } then {
|
if { [regexp $warnings $exec_output] } then {
|
||||||
set failed 2
|
set failed 0
|
||||||
} else {
|
} else {
|
||||||
set failed 1
|
set failed 1
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user