diff options
author | Clément Chigot <clement.chigot@atos.net> | 2021-11-17 16:20:48 +0100 |
---|---|---|
committer | Clément Chigot <clement.chigot@atos.net> | 2022-01-12 09:08:17 +0100 |
commit | 09d4578fd96e7ceb262628cf27d8d9d8b903b529 (patch) | |
tree | 9db674614027d6776d73e05bd437048847c786a7 /gas/testsuite | |
parent | add588a8ef53a5f77f2abda08a5de643923c4cce (diff) | |
download | gdb-09d4578fd96e7ceb262628cf27d8d9d8b903b529.zip gdb-09d4578fd96e7ceb262628cf27d8d9d8b903b529.tar.gz gdb-09d4578fd96e7ceb262628cf27d8d9d8b903b529.tar.bz2 |
gas: add visibility support using GNU syntax on XCOFF
In order to ease port of GNU assembly code and especially ld testsuite,
this patch allows XCOFF to accept the usual GNU syntax for visibility.
PR 22085
gas/ChangeLog:
* config/tc-ppc.c (ppc_GNU_visibility): New function.
* testsuite/gas/ppc/aix.exp: Add new tests.
* testsuite/gas/ppc/xcoff-visibility-2-32.d: New test.
* testsuite/gas/ppc/xcoff-visibility-2-64.d: New test.
* testsuite/gas/ppc/xcoff-visibility-2.s: New test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/ppc/aix.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/xcoff-visibility-2-32.d | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/xcoff-visibility-2-64.d | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/xcoff-visibility-2.s | 9 |
4 files changed, 47 insertions, 0 deletions
diff --git a/gas/testsuite/gas/ppc/aix.exp b/gas/testsuite/gas/ppc/aix.exp index d74d5e8..b2e8400 100644 --- a/gas/testsuite/gas/ppc/aix.exp +++ b/gas/testsuite/gas/ppc/aix.exp @@ -90,4 +90,6 @@ if { [istarget "powerpc*-*-aix*"] || [istarget "rs6000-*-aix*"] } then { run_dump_test "xcoff-visibility-1-32" run_dump_test "xcoff-visibility-1-64" + run_dump_test "xcoff-visibility-2-32" + run_dump_test "xcoff-visibility-2-64" } diff --git a/gas/testsuite/gas/ppc/xcoff-visibility-2-32.d b/gas/testsuite/gas/ppc/xcoff-visibility-2-32.d new file mode 100644 index 0000000..ec2befb --- /dev/null +++ b/gas/testsuite/gas/ppc/xcoff-visibility-2-32.d @@ -0,0 +1,18 @@ +#as: -a32 +#source: xcoff-visibility-2.s +#objdump: -t +#name: XCOFF Visibility 2 (32 bit) + +.* + +SYMBOL TABLE: +.* +.* +\[ 2\].*\(ty 1000\).*internal +.* +\[ 4\].*\(ty 2000\).*hidden +.* +\[ 6\].*\(ty 3000\).*protected +.* +\[ 8\].*\(ty 1000\).*dual +.* diff --git a/gas/testsuite/gas/ppc/xcoff-visibility-2-64.d b/gas/testsuite/gas/ppc/xcoff-visibility-2-64.d new file mode 100644 index 0000000..48d50a5 --- /dev/null +++ b/gas/testsuite/gas/ppc/xcoff-visibility-2-64.d @@ -0,0 +1,18 @@ +#as: -a64 +#source: xcoff-visibility-2.s +#objdump: -t +#name: XCOFF Visibility 2 (64 bit) + +.* + +SYMBOL TABLE: +.* +.* +\[ 2\].*\(ty 1000\).*internal +.* +\[ 4\].*\(ty 2000\).*hidden +.* +\[ 6\].*\(ty 3000\).*protected +.* +\[ 8\].*\(ty 1000\).*dual +.* diff --git a/gas/testsuite/gas/ppc/xcoff-visibility-2.s b/gas/testsuite/gas/ppc/xcoff-visibility-2.s new file mode 100644 index 0000000..c5f0f7f --- /dev/null +++ b/gas/testsuite/gas/ppc/xcoff-visibility-2.s @@ -0,0 +1,9 @@ +# Ensure that GNU syntax is accepted even for XCOFF. + .internal internal + .hidden hidden + .protected protected + +# Ensure that only the last visibility is taken into +# account, when several are provided. + .protected dual + .internal dual |