PATCH: Add x32 support to ldconfig
H.J. Lu
hjl.tools@gmail.com
Fri Mar 16 21:49:00 GMT 2012
On Fri, Mar 16, 2012 at 2:26 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> * sysdeps/unix/sysv/linux/x86_64/ldconfig.h:
>> (SYSDEP_KNOWN_INTERPRETER_NAMES): Add /libx32/ld-linux-x32.so.2.
>
> Sorry, I misread and led you astray. This one shouldn't have the trailing
> colon on the first line, because the next line is just wrapped from what
> would have been "ldconfig.h (SYSDEP_KNOWN_INTERPRETER_NAMES):".
> The other one has it because what follows is a sentence that applies
> to the file rather than to one an entity within it.
That is OK.
>> + if (!ret && !file_flag)
>> + *flag = file_flag;
>
> The second test is inverted, no?
Oops. Fixed.
>> --- 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,
>
> Hmm. Perhaps x86_64/readelflib.c should just #include the i386 file
> after defining a macro that says not to handle EM_IA_64.
>
That is a good idea. I added SKIP_EM_IA_64 and changed x86_64/readelflib.c
to include i386/readelflib.c. 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.
Check EM_IA_64 only if SKIP_EM_IA_64 isn't defined.
* sysdeps/unix/sysv/linux/x86_64/readelflib.c: Just define
SKIP_EM_IA_64 and include <sysdeps/unix/sysv/linux/i386/readelflib.c>.
* 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: 8357 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120316/2211e2aa/attachment.bin>
More information about the Libc-alpha
mailing list