ld expression parsing changes reverted on 2.37 branch
Alan Modra
amodra@gmail.com
Thu Aug 12 00:14:47 GMT 2021
On Wed, Aug 11, 2021 at 07:12:56PM +0000, Thomas Backlund wrote:
> Den 11.8.2021 kl. 20:20, skrev Thomas Backlund:
> >
> > Den 11.8.2021 kl. 19:14, skrev Thomas Backlund:
> >> Den 11.8.2021 kl. 08:03, skrev Alan Modra via Binutils:
> >>> I have reverted
> >>> commit 6afc66a7772e "Re: ld script expression parsing"
> >>> commit fb6c220ebdae "ld --defsym"
> >>
> >> Here, the build now fails with:
> >>
> >> /usr/bin/ld: ldgram.o: in function `yyparse':
> >> /binutils-2.37/objs/ld/../../ld/ldgram.y:179: undefined reference to
> >> `ldlex_defsym'
> >> collect2: error: ld returned 1 exit status
> >>
> >
> > Ah, now I see (I think)
> >
> > ld/ldlex.c is generated in the tarball, so only applying theese
> > patches does not actually add the missing bits to ldlex.c
> >
> >
>
> And just to confirm it... removing ld/ldlex.c forces it to get properly
> regererated and the build works.
Yes, there are a few things that can trip you up when applying
patches. I generally remove patches against generated files from my
posts, and in the case of ldlex.c, the file isn't even stored in git.
--enable-maintainer-mode can be your friend if you have the required
tools installed.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list