Hello,
I had to apply the following patch to be able to use my uclibc instance
which contains relative library file names in the libc.so linker script.
It does not work otherwise, tcc complains about unrecognized file format.
(It worked however if the script contained only absolute file names.)
The patch:
----
--- tccelf.c.ori2 2011-09-19 13:20:59.000000000 +0200
+++ tccelf.c 2011-09-19 14:33:30.000000000 +0200
@@ -3005,7 +3005,7 @@
} else {
/* TODO: Implement AS_NEEDED support. Ignore it for now */
if (!as_needed) {
- ret = ld_add_file(s1, filename, libname);
+ ret = tcc_add_dll(s1, filename, 0);
if (ret)
goto lib_parse_error;
if (group) {
----
The linker script in question was
..../lib/libc.so:
----
/* GNU ld script
* Use the shared library, but some functions are only in
* the static library, so try that secondarily. */
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
GROUP ( libc.so.0 uclibc_nonshared.a AS_NEEDED ( ld-uClibc.so.0 ) )
----
Hope this change makes sense.
Regards,
Rune
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel