This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ld: Add '--defined' command line option.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sourceware dot org
- Date: Tue, 4 Aug 2015 07:21:29 -0400 (EDT)
- Subject: Re: [PATCH] ld: Add '--defined' command line option.
- Authentication-results: sourceware.org; auth=none
- References: <1437426340-25537-1-git-send-email-andrew dot burgess at embecosm dot com> <55B0CF5A dot 1030901 at redhat dot com> <20150728122751 dot GB20589 at embecosm dot com> <55BA49DE dot 9010702 at redhat dot com> <20150803155834 dot GI20589 at embecosm dot com>
On Mon, 3 Aug 2015, Andrew Burgess wrote:
> * Nick Clifton <nickc@redhat.com> [2015-07-30 16:59:26 +0100]:
>
> > Thanks for making these changes. Unfortunately the new tests fail for some
> > targets:
>
> <snip>
>
> > These targets all complain about the ".section .text.1" directive. If you
> > replace it with just ".text" the problem should go away.
>
> I don't think I should do that, the point of using .text.1 was to
> ensure that the symbols in .text.1 could be garbage collected /if/ the
> require-defined did not work. Using .text would mean the symbols
> would never be garbage collected and render the test useless.
(The last sentence requires the context of your
require-defined.s source file to be correct as .text is
garbage-collected exactly like a .text.1 section. Tricked me
into looking! :-)
You'd have to use two assembler files, to keep the _start symbol
from making the .text section kept in that object file.
brgds, H-P