MIPS Creator CI20 patches (again)

Paul Boddie paul at boddie.org.uk
Mon Jan 8 01:14:09 CET 2018

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:

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.


More information about the l4-hackers mailing list