PATCH: Add x32 support to ldconfig

H.J. Lu hjl.tools@gmail.com
Fri Mar 16 19:56:00 GMT 2012


On Fri, Mar 16, 2012 at 11:42 AM, Roland McGrath <roland@hack.frob.com> wrote:
>> 2012-03-16  H.J. Lu  <hongjiu.lu@intel.com>
>>
>>       * elf/cache.c (print_entry): Handle FLAG_X8664_LIBX32.
>>
>>       * sysdeps/generic/ldconfig.h (FLAG_X8664_LIBX32): New.
>
> Drop that blank line and invert the order.  Say "New macro".
>
>>       * sysdeps/unix/sysv/linux/x86_64/dl-cache.h (add_system_dir): New
>>       Don't include <sysdeps/unix/sysv/linux/sparc/dl-cache.h>.
>
> Write it like this:
>
>        * sysdeps/unix/sysv/linux/x86_64/dl-cache.h:
>        Don't include <sysdeps/unix/sysv/linux/sparc/dl-cache.h>.
>        (add_system_dir): New macro.
>
>> --- a/sysdeps/unix/sysv/linux/x86_64/readelflib.c
>> +++ b/sysdeps/unix/sysv/linux/x86_64/readelflib.c
>> @@ -35,8 +35,18 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
>
> While you're here, it seems appropriate to lift the e_machine sanity check
> above the if and make it accept only EM_{386,X86_64} (unconditionally)
> and EM_IA_64 (only for ELFCLASS64).
>
>
> Thanks,
> Roland

Here is the updated patch.  OK to install?

Thanks.

-- 
H.J.
---
2012-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/generic/ldconfig.h (FLAG_X8664_LIBX32): New macro.
	* elf/cache.c (print_entry): Handle FLAG_X8664_LIBX32.

	* sysdeps/unix/sysv/linux/i386/readelflib.c (process_elf_file):
	Move e_machine check before EI_CLASS check.  Handle x32 libraries.
	* sysdeps/unix/sysv/linux/x86_64/readelflib.c (process_elf_file):
	Likewise.

	* sysdeps/unix/sysv/linux/x86_64/dl-cache.h
	Don't include <sysdeps/unix/sysv/linux/sparc/dl-cache.h>.
	(add_system_dir): New macro.

	* sysdeps/unix/sysv/linux/x86_64/ldconfig.h
	(SYSDEP_KNOWN_INTERPRETER_NAMES): Add /libx32/ld-linux-x32.so.2.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libc-x32-ldconfig.patch
Type: text/x-patch
Size: 6236 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120316/f24eb902/attachment.bin>


More information about the Libc-alpha mailing list