This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Gold: Add a target hook to allow overriding output section name.
"Doug Kwan (éæå)" <dougkwan@google.com> writes:
> With your change, I can add mapping for ARM special sections using
> something like:
>
> Index: layout.cc
> ===================================================================
> RCS file: /cvs/src/src/gold/layout.cc,v
> retrieving revision 1.124
> diff -u -r1.124 layout.cc
> --- layout.cc 4 Jun 2009 00:43:11 -0000 1.124
> +++ layout.cc 4 Jun 2009 18:33:23 -0000
> @@ -2887,6 +2887,10 @@
> MAPPING_INIT(".gnu.linkonce.lr.", ".lrodata"),
> MAPPING_INIT(".gnu.linkonce.l.", ".ldata"),
> MAPPING_INIT(".gnu.linkonce.lb.", ".lbss"),
> + MAPPING_INIT(".ARM.extab.", ".ARM.extab"),
> + MAPPING_INIT(".gnu.linkonce.armextab.", ".ARM.extab"),
> + MAPPING_INIT(".ARM.exidx.", ".ARM.exidx"),
> + MAPPING_INIT(".gnu.linkonce.armexidx.", ".ARM.exidx"),
> };
> #undef MAPPING_INIT
>
>
> This is very simple. May only concern is that the mapping is visible
> to all targets, not just ARM. This probably is okay since I do not
> expect other targets to use these section names.
>
> Is it okay to add these mapping?
Sure, let's go ahead and do it that way. Maybe we'll have to change it
later, we'll see.
Thanks.
Ian