This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Add x32 support to dynamic linker audit
On Thu, Mar 22, 2012 at 2:41 PM, Carlos O'Donell
<carlos@systemhalted.org> wrote:
> On Thu, Mar 22, 2012 at 1:59 PM, Roland McGrath <roland@hack.frob.com> wrote:
>>> It is happening, but when compiling for x86 the x32 for x86-64 bits
>>> aren't enabled by default.
>>
>> I see. ?It's somewhat odd that sysdeps/generic/ldsodefs.h lists many
>> different arch-specific rather than just using sysdeps files to define the
>> ones for the arch actually being built. ?Why is it that way?
>
> I don't know.
In summary it looks like we have 4 different solutions:
(a) Use `struct La_x32_*;' in ldsodefs.h even though it doesn't
actually match the real type used, but this doesn't matter because
when compiling for the right machine it is changed by the macros and
works out. It's only when *not* compiling for x32 that the debug info
won't match, but you also don't get the proper structure definition
since bits/link.h comes from the other machine you're targetting.
(b) Use `#define La_x32_*' in ldsodefs.h, mirroring what's in
bits/link.h for x86_64. The downside here is that this is a
duplication of code.
(c) Rewrite ldsodefs.h to stop listing all of the interface for all of
the machines.
(d) Rewrite bits/link.h to expose a real structure called La_x32_*
when compiling for x32, otherwise La_x86_64_* when compiling for
x86_64.
I think that (a) is clean, works correctly when compiling for the
right machine, and is the simplest solution.
Having said that I'd love to see (c), but I feel bad heaping that work on H.J.
Comments?
Cheers,
Carlos.