tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] likner script parser - support relative/short file names?


From: u-tcc-uepj
Subject: [Tinycc-devel] likner script parser - support relative/short file names?
Date: Mon, 19 Sep 2011 18:49:32 +0200
User-agent: Mutt/1.4.2.3i

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]