Question on PowerPC relocation error

Sergei Organov osv@topconrd.ru
Mon Feb 9 13:41:00 GMT 2004


Momchil Velikov <velco@fadata.bg> writes:
> >>>>> "osv" == Sergei Organov <osv@topconrd.ru> writes:
> 
>     osv> No, I think it ended up in .bss while it should end up in
>     osv> .sbss. I guess it's linker command file is broken -- it
>     osv> somehow forces this variable that compiler puts in .sbss to
>     osv> end up in .bss. Relevant part of the linker map file would be
>     osv> appropriate to see what happened.
> 
> Or not broken, but having
> 
> .bss : 
> {
>   ...
>   __SDA_BASE__ = <some-appropriate-value>
>   * (.sbss)
>  
>   ...
> }

That is "broken" from the point of view of binutils 2.10+ :-(

> 
>     osv> I believe you need to fix linker command file in order the
>     osv> globalExceptHdl variable to end up in the .sbss output
>     osv> section instead of .bss. This way all the C code will access
>     osv> it correctly and efficiently, and asm code will still access
>     osv> it correctly while not as efficiently.
> 
>   The ONLY thing that needs fixing is to make sure the variable is
> sufficiently close to __SDA_BASE__ or __SDA2_BASE__ (+- 32K, IIRC),
> r13 is set to __SDA_BASE__ and then delete the bogus errors from the
> bfd (or turn them to warnings).

I know that. I've hit this change in binutils myself and was forced to
change some of my linker command files to overcome the problem. I've read your
conversation about the issue and I'm on your side here. I'd suggest to try to
propose patch that optionally turns the check off (using command-line option),
-- maybe binutils guys accept that...

-- 
Sergei.



More information about the Binutils mailing list