This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Always define referenced __start_SECNAME/__stop_SECNAME
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 13 Jun 2017 09:02:08 +0930
- Subject: Re: [PATCH] Always define referenced __start_SECNAME/__stop_SECNAME
- Authentication-results: sourceware.org; auth=none
- References: <20170610224649.GA12339@gmail.com>
On Sat, Jun 10, 2017 at 03:46:49PM -0700, H.J. Lu wrote:
> This patch changes linker to always define referenced __start_SECNAME and
> __stop_SECNAME if the input section name is the same output section name,
> which is always true for orphaned sections, and SECNAME is a C identifier.
I think this change is reasonable.
> Also __start_SECNAME and __stop_SECNAME symbols are marked as hidden by
> ELF linker.
Why is this necessary? Also, you make another change in behaviour
that you don't mention: __start and __stop symbols were previously
defined by ld -Ur, not just at final link. You'll need to modify
lang_set_startof to keep this behaviour (and be careful to not change
.startof. and .sizeof. syms).
Australia Development Lab, IBM