This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA:] ld section location mishap. Attention PE, HPPA, PPC64.
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 4 Feb 2002 22:44:46 -0500
- Subject: Re: [RFA:] ld section location mishap. Attention PE, HPPA, PPC64.
- References: <200202050201.DAA10282@ignucius.axis.se>
On Tue, Feb 05, 2002 at 03:01:43AM +0100, Hans-Peter Nilsson wrote:
> When linking with --gc-sections, I noticed the hard way that
> sections started at what seemed like a random location when
> there was no explicitly set address (--section-start) or with
> the elf.sc default for everything at 0 (TEXT_BASE_ADDRESS). It
> was actually a left-over value in the (default) memory region
> that was used to set the section address, if certain data
> (stabs, EH) was successfully GC:ed for ELF. The caller of
> lang_size_sections/ lang_do_assignments,
> gld${EMULATION_NAME}_finish, did not properly reset memory
> regions like lang_process does. Actually there was some
> difficulty in doing that since the proper function wasn't
> public.
>
> The same problem seems to exist for other callers: pe-dll.c
> (twice), emultempl/hppaelf.em and emultempl/ppc64elf.em. I
> leave those to the respective maintainer. (Sorry.)
Was this introduced recently? And HPPA almost certainly has the same
problem, as that is where I originally got the code for _finish from.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer