diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-08-23 16:03:44 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-08-28 05:51:58 -0700 |
commit | dbb062e5e9204fab16caaf87d4efc2e703039bab (patch) | |
tree | d35b5cb913258b39b7367fbf670f2057aabf7642 | |
parent | 57a3845126b3cbba672efc31a15941b3e2c9d8bd (diff) | |
download | binutils-dbb062e5e9204fab16caaf87d4efc2e703039bab.zip binutils-dbb062e5e9204fab16caaf87d4efc2e703039bab.tar.gz binutils-dbb062e5e9204fab16caaf87d4efc2e703039bab.tar.bz2 |
gold: Disable &no_such_symbol_ != NULL check when GOT in use
Since this test:
if (&no_such_symbol_ != NULL)
{
fprintf(stderr, "FAILED weak undef test 4: %s\n",
"&no_such_symbol_ is not NULL");
status = 1;
}
always fails when GOT is used and aarch64 always uses GOT, disable it
for aarch64 and PIC.
PR gold/32112
* testsuite/weak_undef_test.cc (main): Disable the
&no_such_symbol_ != NULL check for aarch64 and PIC.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r-- | gold/testsuite/weak_undef_test.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gold/testsuite/weak_undef_test.cc b/gold/testsuite/weak_undef_test.cc index 134b31a..80973cc 100644 --- a/gold/testsuite/weak_undef_test.cc +++ b/gold/testsuite/weak_undef_test.cc @@ -81,12 +81,15 @@ main() status = 1; } +#if !defined __PIC__ && !defined __aarch64__ + // This test always fails when GOT is used. if (&no_such_symbol_ != NULL) { fprintf(stderr, "FAILED weak undef test 4: %s\n", "&no_such_symbol_ is not NULL"); status = 1; } +#endif if (p1 != NULL) { |