This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: static-after-extern tests vs. mips explicit relocs


On May  7, 2003, Richard Henderson <rth@redhat.com> wrote:

> This is a real linker bug, IMO.  Or perhaps yet another
> serious flaw in the stupid MIPS ELF spec.

The latter.

> So can we do something on the assembler side to fix this?
> Transform call16 relocs against local symbols in some way?

Not if using say the Irix assembler.  The reason assemblers used to be
able to do this properly is that they get to see the whole program
before deciding which relocation to emit for each symbol.  We'd need
the same kind of complete information in the compiler to that end.

That said, IIRC, declaring a function as extern then defining it as
static is ill-formed, isn't it?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]