This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Intermingling sections
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Sterling <Sterling at tensilica dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 30 Nov 2001 15:27:09 -0500
- Subject: Re: Intermingling sections
- References: <3C07EC18.C30A4A16@tensilica.com>
On Fri, Nov 30, 2001 at 12:29:12PM -0800, Sterling wrote:
> I am working on a linker script for my company's port of the gnu
> binutils to our architecture. according to the version string, I am
> using 2.11 with BFD 2.11.
>
> According to the documentation at
>
> http://sources.redhat.com/binutils/docs-2.10/ld_3.html#SEC23
>
> >>>>>>>>>>>
> 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.
> <<<<<<<<<
Use a newer version of the linker.
I believe this was fixed in:
2001-08-03 Alan Modra <amodra@bigpond.net.au>
* ld.texinfo (Input Section Basics): Clarify ordering of output
sections.
* ldlang.c (callback_t): Add wildcard_list param.
(walk_wild_section): Remove "section" param. Rewrite for
lang_wild_statement_type change. Remove unique_section_p test.
(walk_wild_file): Remove "section" param.
(walk_wild): Remove "section" and "file" params.
(lang_gc_wild): Likewise.
(wild): Likewise. Modify for lang_wild_statement_type change.
(wild_sort): Likewise. Add "sec" param.
(gc_section_callback): Likewise.
(output_section_callback): Likewise. Do unique_section_p test.
(map_input_to_output_sections): Modify call to wild.
(lang_gc_sections_1): Likewise.
(print_wild_statement): Modify for lang_wild_statement_type
change.
(lang_add_wild): Replace filename, filenames_sorted param with
filespec. Replace section_name, sections_sorted,
exclude_filename_list with section_list.
* ldlang.h (lang_add_wild): Here too.
(lang_wild_statement_type): Replace section_name, sections_sorted,
and exclude_filename_list with section_list.
* ldgram.y (current_file): Delete.
(%union): Add wildcard_list.
(file_NAME_list): Set type to wildcard_list. Build a linked list
rather than calling lang_add_wild for each entry.
(input_section_spec_no_keep): Call lang_add_wild here instead.
* ld.h (struct wildcard_list): Declare.
* mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer