MIPS Creator CI20 patches (again)
Paul Boddie
paul at boddie.org.uk
Thu Dec 21 01:55:51 CET 2017
On Wednesday 20. December 2017 16.52.45 Paul Boddie wrote:
>
> However, another problem has emerged when trying to build L4Re. It appears
> that something changed between r72 and r73, and now, when I try and build
> L4Re, I get a linker error as described in the following Debian bug report:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884821
>
> ----
> mipsel-linux-gnu-ld: main.o: Can't find matching LO16 reloc against `.text'
> for R_MIPS_GOT16 at 0x1f8 in section `mipsel-linux-gnu-ld: BFD (GNU
> Binutils for Debian) 2.29.1 internal error, aborting at
> ../../bfd/bfd.c:866 in _bfd_doprnt
>
> mipsel-linux-gnu-ld: Please report this bug.
> ----
>
> Has anything changed in r73 that might affect the structure of generated
> binaries? The same error can also be reproduced in r74 and r75.
I have narrowed this down to the example in pkg/examples/sys/utcb-ipc. The
only changes made in r73 are these:
Index: pkg/examples/sys/utcb-ipc/main.c
===================================================================
--- pkg/examples/sys/utcb-ipc/main.c (revision 72)
+++ pkg/examples/sys/utcb-ipc/main.c (working copy)
@@ -21,6 +21,7 @@
#include <l4/sys/utcb.h>
#include <l4/re/env.h>
#include <l4/re/c/util/cap_alloc.h>
+#include <l4/util/thread.h>
#include <stdio.h>
#include <string.h>
@@ -46,7 +47,7 @@
}
}
-static void thread2(void)
+L4UTIL_THREAD_STATIC_FUNC(thread2)
{
l4_msgtag_t tag;
l4_msg_regs_t mr;
@@ -64,6 +65,8 @@
printf("%c", (char)mr.mr[i]);
printf("\n");
}
+
+ __builtin_trap();
}
int main(void)
Changing the function prototype back to its earlier form seems to prevent the
error, but I guess this is not what we want to do. It seems very odd that
similar examples such as pkg/examples/sys/vcpu do not seem to suffer from the
same problem, however.
Paul
More information about the l4-hackers
mailing list