[PATCH] Fix tst-array* on x86_64
H. J. Lu
hjl@lucon.org
Tue Dec 10 16:56:00 GMT 2002
On Tue, Dec 10, 2002 at 04:35:54PM -0800, Roland McGrath wrote:
> I already read the linker script of course. I don't see how that explains
> it. The ALIGN is done before the symbol or the section. Ah, but you are
> saying that the section will have sh_addralign of 16 and that will skip the
> word after the symbol and before the section. Of course, you didn't say
> that so I can only assume that having me just get lucky and guess what you
> meant was your way of being helpful.
The linker script shows that __preinit_array_start is aligned by
ALIGN(${ALIGNMENT}). It doesn't matter what alignment .preinit_array
uses. A target has to make sure all __*_array_start are aligned
properly. The current elf.sc assumes ALIGN(${ALIGNMENT}) will align
all __*_array_start correctly. It seems to work for ia32 and ia64.
H.J.
More information about the Libc-hacker
mailing list