This is the mail archive of the
mailing list for the binutils project.
Re: Enable 0x10 alignment for aarch64 symbols as is done for x86_64
- From: Cary Coutant <ccoutant at gmail dot com>
- To: K Jski <bielsk1 at vt dot edu>
- Cc: Binutils <binutils at sourceware dot org>, Antonio Barbalace <antoniob at vt dot edu>
- Date: Thu, 16 Apr 2015 13:30:25 -0700
- Subject: Re: Enable 0x10 alignment for aarch64 symbols as is done for x86_64
- Authentication-results: sourceware.org; auth=none
- References: <CAH=yU0YozLe6hgeQK_1ni8CWT9Na6U2WV3GYgFE-moq46DEqfQ at mail dot gmail dot com>
> I am currently utilizing gold to align program symbols as well as
> library symbols of newlib into the binary I am producing.
> I see that symbols are grabbed from object files and stored in Symtab
> (this->table_) without the 0x10 alignment and then get lost in the
> code until they are already in Output_section::Input_section_list
> (this->input_sections) where their final address is set (using
> function set_address_and_file_offset)WITH an alignment to make sure
> the next symbol is mod 16 (0x10)
> Where is this non-input section element being placed into the
> I realize there are arch specific files (aarch64.cc, x86_64.cc) but
> cannot find where this 0x10 offset or additional padding option is
> within the x86_64.cc file
> Any help would be nice. Thank you for your time in advance!
I'm going to need a little more information about what you're trying
to do. I don't know what you are referring to when you say "this
non-input section element". And what "0x10 alignment" are you talking
Symbols don't have an alignment; sections do. When we layout an input
section, we adjust its offset within the output section to the
required alignment, and also adjust the output section's alignment to
the largest required alignment of its input sections. Symbols (except
for absolute symbols) merely have a value relative to the input
section where they are defined.