This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] MIPS gas: Reallow branches to global file-internal labels
Alexandre Oliva wrote:
> On Feb 12, 2003, Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> wrote:
>
> > This seems to be intentional, as the testcase was adjusted accordingly.
>
> Yes, it is intentional. Global symbols are supposed to be overridable
> according to ELF library semantics. Resolving them locally, like the
> IRIX assembler does, looks like a bug to me. If we can't represent
> it, we can't, live it with.
But not all objects have to be (conforming) ELF libraries.
> > However, this breaks much code, especially performance-critical
> > hand-coded one.
>
> Hand-coded assembly can always be adjusted so as to use local labels,
> such that only local labels are used as branch targets.
It loses performance and enlarges the code, because conditional branches
have to be converted to branch-and-jump sequences.
> > To my knowledge, it affects at least the Linux
> > Kernel, glibc and dietlibc.
>
> Kernel is fixed. Glibc fixes are still awaiting approval. I haven't
> looked at dietlibc.
IMHO the assembler should reallow branches to globals instead, at least
for non-ELF-libraries.
Thiemo