ld i386 differences 2.10.2 / 2.12
Etienne Lorrain
etienne_lorrain@yahoo.fr
Tue Mar 26 03:47:00 GMT 2002
--- Alan Modra <amodra@bigpond.net.au> a écrit :
> On Tue, Mar 26, 2002 at 04:39:51PM +1030, Alan Modra wrote:
> > On Mon, Mar 25, 2002 at 04:34:03PM +0100, Etienne Lorrain wrote:
> >
> > > 2) a lot of "prohibited cross reference" in between sections,
probably
> > > due to the lines in boot.lnk (make boot.lnk):
> > > NOCROSSREFS (.text .extra);
> > > NOCROSSREFS (.extra_text .text_extra);
> > > while using intermediate segments .Xextra2text and .Xtext2extra
> > > which can themselves have cross references.
> > >
> > > I do not see the reason why this is only on ld-2.12, have the
> > > cross reference algorithm been changed to be recusive?
> >
> > You've likely found a bug in some changes I made.
>
> Now that I've actually looked at the warnings in detail, it appears
> they are all
> prohibited cross reference from .extra_text to `.Xtext2extra' in
> .text_extra
> or
> prohibited cross reference from .text_extra to `.Xextra2text' in
> .extra_text
>
> But that's exactly what you asked for. NOCROSSREFS works on output
> sections, and .Xtext2extra is part of the .text_extra output section.
> Similarly, .Xextra2text is part of the .extra_text output section.
This bug is mine, the line "NOCROSSREFS (.extra_text .text_extra);"
should not exist in my boot.{ld,lnk}.
I do not know exactly why the cross references were not flagged
with ld-2.10 / ld-2.11, maybe because it is local symbols referenced
only by "mov ...,1f \n ... \n 1:".
The thing I was trying to do is more:
NOCROSSREFS (.extra_text .text);
NOCROSSREFS (.text_extra .extra);
to forbid a function F1 in ".text" to call a stub ".extraF2 -> .textF2"
instead of calling directly the ".text" function F2, considering the
two function F1 and F2 in the ".text" segment, and the stub in the
".extra_<unprotected>" address space.
This cannot work because I need at least one cross-ref per stub, for
the stub itself.
For the ".rel*" sections, because I did not find any option
to at least remove the warnings, I added to my linker file:
SECTIONS {
....
.ld-2.12.bug_please_ignore_warning (NOLOAD) : {
*(.rel*)
}
}
So it just complains once:
/home/etienne/projet/toolchain/bin/ld: warning: no memory region specified
for section `.ld-2.12.bug_please_ignore_warning'
Note that it is a strange warning for a "NOLOAD" section.
Thanks,
Etienne.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
More information about the Binutils
mailing list