This is the mail archive of the binutils@sourceware.org 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: [PATCH] [LD] Add ALIGN_WITH_INPUT output section attribute


Hello,

what is the background of this patch?

Before 2.23.2 I did this:

1. Get the default linker script (ld --verbose).

2. For each output section select a VMA and LMA region.

3. Sort the output sections according to LMA region and preserve order of default linker script in each LMA region equivalence class.

4. Add begin, end and size symbols for each VMA and LMA region pair. Use memcpy() in the application start code to initialize the VMA regions.

5. Add custom sections.

With the change in 2.23.2 step 4 is broken. I had to merge all output sections of a VMA and LMA region pair into one. This breaks for example the dynamic linking and debugging in C++. I had to introduce special cases for small-data areas and ARM exception tables. In order to overcome these problems I propose the ALIGN_WITH_INPUT attribute to restore the behaviour prior to 2.23.2.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


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