This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
input section ordering
- To: binutils at sourceware dot cygnus dot com
- Subject: input section ordering
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Thu, 21 Jun 2001 21:55:20 +0930
- Cc: Ian Lance Taylor <ian at zembu dot com>
ld.info, Node: Input Section Basics says this:
"There are two ways to include more than one section:
*(.text .rdata)
*(.text) *(.rdata)
The difference between these is the order in which the `.text' and
`.rdata' input sections will appear in the output section. In the
first example, they will be intermingled. In the second example, all
`.text' input sections will appear first, followed by all `.rdata'
input sections."
This paragraph was the basis for my suggestion to Geoff Keating re
.eh_frame data. The trouble is, I can't see how the linker accomplishes
the above difference in input section order. In fact, looking at
ldgram.y:input_section_spec, I think the linker treats both of the
above input section statements exactly the same. Can anyone tell me
otherwise?
The next question is how to go about implementing a fix. I figure we
need some sort of structure to handle the file name spec ('*' above),
that has a list of children handling the sections (specified above
inside the parentheses). Then it's a matter of modifying most of
the functions that play with lang_input_statement_type structures.
And about here is where I start to mumble.
Alan