mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-13 13:49:00 +08:00
mingw plugin test regressions due to commit 514b4e191d5f
Fixes new failures due to image base change. PR 19011 * testsuite/ld-plugin/plugin.exp: Use modified CFLAGS throughout file. Add --image-base for pecoff.
This commit is contained in:
parent
3b1450b38c
commit
16f9c644c7
@ -1,3 +1,9 @@
|
||||
2020-08-28 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 19011
|
||||
* testsuite/ld-plugin/plugin.exp: Use modified CFLAGS throughout
|
||||
file. Add --image-base for pecoff.
|
||||
|
||||
2020-08-28 Nelson Chu <nelson.chu@sifive.com>
|
||||
|
||||
testsuite/ld-riscv-elf/lib-nopic-01a.s: Use R_RISCV_JAL rather
|
||||
|
@ -95,6 +95,7 @@ set _ ""
|
||||
set plugin_nm_output ""
|
||||
set old_CFLAGS "$CFLAGS"
|
||||
append CFLAGS " $NOSANTIZE_CFLAGS"
|
||||
|
||||
if { $can_compile && \
|
||||
(![ld_compile "$CC $CFLAGS" $srcdir/$subdir/main.c tmpdir/main.o] \
|
||||
|| ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/func.c tmpdir/func.o] \
|
||||
@ -105,7 +106,6 @@ if { $can_compile && \
|
||||
# Defer fail until we have list of tests set.
|
||||
set failed_compile 1
|
||||
}
|
||||
set CFLAGS "$old_CFLAGS"
|
||||
|
||||
set dotsym 0
|
||||
if { $can_compile && !$failed_compile } {
|
||||
@ -129,6 +129,10 @@ set libs "[ld_link_defsyms] --defsym ${_}printf=${_}main --defsym ${_}puts=${_}m
|
||||
if { $dotsym } {
|
||||
append libs " --defsym .printf=.main --defsym .puts=.main"
|
||||
}
|
||||
if [is_pecoff_format] {
|
||||
#otherwise relocs overflow to symbols defined on the command line
|
||||
append libs " --image-base=0x10000000"
|
||||
}
|
||||
|
||||
set plugin_tests [list \
|
||||
[list "load plugin" "-plugin $plugin_path \
|
||||
@ -289,15 +293,16 @@ if { !$can_compile || $failed_compile } {
|
||||
$failure_kind [lindex $testitem 0]
|
||||
}
|
||||
}
|
||||
set CFLAGS "$old_CFLAGS"
|
||||
return
|
||||
}
|
||||
|
||||
run_ld_link_tests $plugin_tests
|
||||
|
||||
if { [is_elf_format] \
|
||||
&& [ld_compile "$CC $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/func1p.c tmpdir/func1p.o] \
|
||||
&& [ld_compile "$CC $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/func2i.c tmpdir/func2i.o] \
|
||||
&& [ld_compile "$CC $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/func3h.c tmpdir/func3h.o] } {
|
||||
&& [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func1p.c tmpdir/func1p.o] \
|
||||
&& [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func2i.c tmpdir/func2i.o] \
|
||||
&& [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func3h.c tmpdir/func3h.o] } {
|
||||
run_ld_link_tests $plugin_extra_elf_tests
|
||||
}
|
||||
|
||||
@ -390,3 +395,5 @@ if [ar_simple_create $ar "--plugin $plugin4_path" "tmpdir/libpr20070.a" \
|
||||
} else {
|
||||
unresolved "PR ld/20070"
|
||||
}
|
||||
|
||||
set CFLAGS "$old_CFLAGS"
|
||||
|
Loading…
x
Reference in New Issue
Block a user