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

Re: mklibs.py, unresolved symbol



On Sun, Sep 16, 2001 at 05:25:56PM -0400, Adam Di Carlo wrote:
> 
> Ethan, I was finding other problems with mklibs.py on powerpc, to wit,
> ld-linux.so.2 was used in a non-portable way.  To get it to work on
> PowerPC, I had to use this patch.
> 
> Is anyone interesting in fixing these problems?
> 
> -- 
> ...Adam Di Carlo..<adam@onshore-devel.com>...<URL:http://www.onshored.com/>
> 
> diff -u -u -r1.4 mklibs.py
> --- mklibs.py	2001/08/11 06:55:18	1.4
> +++ mklibs.py	2001/09/16 21:18:49
> @@ -352,7 +352,7 @@
>              base_name = so_pattern.match(library).group(1)
>              # libc needs its soinit.o and sofini.o as well as the pic
>              if base_name == "libc":
> -                extra_flags = find_lib("ld-linux.so.2")
> +                extra_flags = find_lib("ld-2.2.3.so")

You probably want to check by architecture what to use instead of
hardcoding 2.2.3...  It's not much work - just:
	objcopy -j .interp -O binary /bin/ls foo
	cat foo
(being aware that foo will be a null, rather than newline, terminated
string).

ld-linux.so.2 is standard on some architectures, and ld.so.1 is
standard on others.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



Reply to: