This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Enable 0x10 alignment for aarch64 symbols as is done for x86_64

To put a long story short, I am trying to create an alignment tool for
x86_64/ aarch64 binaries to align sections/symbols to be at the same
addresses within both binaries (to enable cross architecture migration
of the program, this way both architectures have the same symbol
alignment when moving the program between ISAs and will access the
correct address when on either system). I am also providing gold with
a linker script to align .text, .rodata, .data, and .bss symbols.

e.g. function foo, will be at 0x4100000 for both the x86 binary and
aarch64 binary, as well as __args_for_foo will be at 0x4f0030 within
both the x86 and aarch64 binary, etc.

For the time being I've copied over the x86_64 implementation of
Target_aarch64::do_code_fill() into so that it is still
possible to fille the section with something.

The actual problem I am running into is that I am finding I have no
control over alignment of bss symbols even though I have wrote it in
the linker script.
e.g. __args_for_foo is at 0x4f00238 on aarch64 (not aligned) and is at
0x4f00240 on x86_64 (aligned to 0x10)
even though I have :
. = ALIGN(0x10);

within the bss section of the aarch64 linker script.



On Thu, Apr 16, 2015 at 6:01 PM, Cary Coutant <> wrote:
>> Another more direct question is:
>> Where are code fill sections inserted? At what point are this->table_
>> elements put into the Output_section::Input_section object that has
>> access via "this->input_sections()"
>> There are no relo's in my code, i am linking statically also btw.
> I'm concerned that I still don't know what you're really trying to
> accomplish, and that you may be headed down the wrong path. If you can
> describe what problem you're trying to solve, I might be able to help.
> -cary

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]