Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
binutils-gdb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastien Michelland
binutils-gdb
Commits
a9f844b1
Commit
a9f844b1
authored
15 years ago
by
Nick Clifton
Browse files
Options
Downloads
Patches
Plain Diff
* ld-elfvsb/elfvsb.exp: Fix tests for arm*-*-linux*.
* ld-shared/shared.exp: Likewise.
parent
cb1be87e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ld/testsuite/ChangeLog
+5
-0
5 additions, 0 deletions
ld/testsuite/ChangeLog
ld/testsuite/ld-elfvsb/elfvsb.exp
+32
-0
32 additions, 0 deletions
ld/testsuite/ld-elfvsb/elfvsb.exp
ld/testsuite/ld-shared/shared.exp
+31
-0
31 additions, 0 deletions
ld/testsuite/ld-shared/shared.exp
with
68 additions
and
0 deletions
ld/testsuite/ChangeLog
+
5
−
0
View file @
a9f844b1
2010-02-09 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ld-elfvsb/elfvsb.exp: Fix tests for arm*-*-linux*.
* ld-shared/shared.exp: Likewise.
2010-02-08 David S. Miller <davem@davemloft.net>
* ld-ifunc/ifunc.exp: Run for sparc.
...
...
This diff is collapsed.
Click to expand it.
ld/testsuite/ld-elfvsb/elfvsb.exp
+
32
−
0
View file @
a9f844b1
...
...
@@ -60,6 +60,7 @@ if ![isnative] then {return}
set tmpdir tmpdir
set SHCFLAG ""
set shared_needs_pic "no"
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
...
...
@@ -91,6 +92,27 @@ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
close $file
}
if [istarget arm*-*-linux*] {
# On ARM section anchors can change the symbol pre-emptability for
# non-PIC shared libraries, causing these tests to fail. Turn section
# anchors off.
set SHCFLAG "-fno-section-anchors"
# On targets that have MOVW the compiler will emit relocations which
# the linker doesn't support when compiling -shared without -fpic. The
# test to find out whether we want to XFAIL the non-PIC tests requires
# a compile - so we pre-calculate it here. We also note that this can
# only affect arm*-*-*eabi targets as the old ABI doesn't support v7.
if [istarget arm*-*-*eabi] {
set file [open $tmpdir/movw-detect.c w]
puts $file "void foo(void) { __asm (\"movw r0, #0\"); }"
close $file
if [run_host_cmd_yesno "$CC" "$CFLAGS -c $tmpdir/movw-detect.c -o $tmpdir/movw-detect.o"] {
set shared_needs_pic "yes"
}
}
}
set support_protected "no"
if [istarget *-*-linux*] {
...
...
@@ -201,6 +223,7 @@ proc visibility_run {visibility} {
global picflag
global target_triplet
global support_protected
global shared_needs_pic
if [ string match $visibility "hidden" ] {
set VSBCFLAG "-DHIDDEN_TEST"
...
...
@@ -273,6 +296,9 @@ proc visibility_run {visibility} {
if { ![istarget hppa*64*-*-linux*] } {
setup_xfail "hppa*-*-linux*"
}
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb
...
...
@@ -311,6 +337,9 @@ proc visibility_run {visibility} {
if { ![istarget hppa*64*-*-linux*] } {
setup_xfail "hppa*-*-linux*"
}
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o elfvsb \
...
...
@@ -377,6 +406,9 @@ proc visibility_run {visibility} {
if { ![istarget hppa*64*-*-linux*] } {
setup_xfail "hppa*-*-linux*"
}
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb
}
...
...
This diff is collapsed.
Click to expand it.
ld/testsuite/ld-shared/shared.exp
+
31
−
0
View file @
a9f844b1
...
...
@@ -66,6 +66,7 @@ if { [istarget *-*-linux*aout*] \
set tmpdir tmpdir
set SHCFLAG ""
set shared_needs_pic "no"
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
...
...
@@ -97,6 +98,27 @@ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
close $file
}
if [istarget arm*-*-linux*] {
# On ARM section anchors can change the symbol pre-emptability for
# non-PIC shared libraries, causing these tests to fail. Turn section
# anchors off.
set SHCFLAG "-fno-section-anchors"
# On targets that have MOVW the compiler will emit relocations which
# the linker doesn't support when compiling -shared without -fpic. The
# test to find out whether we want to XFAIL the non-PIC tests requires
# a compile - so we pre-calculate it here. We also note that this can
# only affect arm*-*-*eabi targets as the old ABI doesn't support v7.
if [istarget arm*-*-*eabi] {
set file [open $tmpdir/movw-detect.c w]
puts $file "void foo(void) { __asm (\"movw r0, #0\"); }"
close $file
if [run_host_cmd_yesno "$CC" "$CFLAGS -c $tmpdir/movw-detect.c -o $tmpdir/movw-detect.o"] {
set shared_needs_pic "yes"
}
}
}
# The test procedure.
proc shared_test { progname testname main sh1 sh2 dat args } {
global CC
...
...
@@ -212,6 +234,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
}
setup_xfail "x86_64-*-linux*"
setup_xfail "s390x-*-linux*"
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
# Test ELF shared library relocations with a non-zero load
...
...
@@ -232,6 +257,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
}
setup_xfail "x86_64-*-linux*"
setup_xfail "s390x-*-linux*"
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
shared_test shnp "shared (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o shared \
"-T $srcdir/$subdir/elf-offset.ld"
...
...
@@ -281,6 +309,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m
}
setup_xfail "x86_64-*-linux*"
setup_xfail "s390x-*-linux*"
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
}
} else {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment