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 '--defined' command line option.


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


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