This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] [LD] Add ALIGN_WITH_INPUT output section attribute
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Binutils <binutils at sourceware dot org>
- Date: Fri, 28 Jun 2013 09:23:22 +0200
- Subject: Re: [PATCH] [LD] Add ALIGN_WITH_INPUT output section attribute
- References: <1372342669-4598-1-git-send-email-sebastian dot huber at embedded-brains dot de>
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.