[PATCH] gold: Disable &no_such_symbol_ != NULL check when GOT in use
H.J. Lu
hjl.tools@gmail.com
Wed Aug 28 12:33:20 GMT 2024
On Sun, Aug 25, 2024 at 7:14 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Fri, Aug 23, 2024 at 4:03 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > 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>
> > ---
> > gold/testsuite/weak_undef_test.cc | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/gold/testsuite/weak_undef_test.cc b/gold/testsuite/weak_undef_test.cc
> > index 134b31a2379..80973cc9fd4 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)
> > {
> > --
> > 2.46.0
> >
>
> Any comments?
>
> --
> H.J.
I am checking it in.
--
H.J.
More information about the Binutils
mailing list