MIPS Creator CI20 patches (again)

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue Jan 9 00:46:53 CET 2018


On Mon Jan 08, 2018 at 01:14:09 +0100, Paul Boddie wrote:
> On Monday 8. January 2018 00.37.41 Adam Lackorzynski wrote:
> > 
> > Is it ok if you have visibility("hidden") instead of internal?
> 
> No, it would seem that all other visibility types produce the same error. In 
> fact, the only thing that seems to prevent an error is to qualify the function 
> signature as static, as previously noted:

Alright, strange, but thanks for investigating.

> static void thread2(void);
> 
> Trying other visibility types or just omitting the static qualifier from the 
> above causes the same error, the essence of which is this:
> 
> Can't find matching LO16 reloc against `.text' for R_MIPS_GOT16 at 0x1f8
> 
> So, I guess it is some kind of code generation bug in the toolchain, but it 
> did make me wonder what the L4UTIL_THREAD_STATIC_FUNC macro does and why we 
> get this problem now. It seems like it introduces a wrapper function that sets 
> up the appropriate register for position-independent code (reminiscent of the 
> ci20-gcc-cpload.diff file amongst my patches which does the same for various 
> l4re-core components that won't otherwise work when compiled with GCC).
> 
> And maybe this wrapper function confuses the compiler somehow. However, it 
> doesn't confuse the compiler for the vcpu example where it is also used. So, 
> there might be something else going on as well.
> 
> I'm aiming to follow up with the binutils maintainers about this, but I just 
> wondered if any of this sounded problematic or familiar.

No, not familiar. It works with the older tool set, i.e. would be
interesting whether the more recent ones are not ok here or the code
needs to change.


Adam




More information about the l4-hackers mailing list