RFC: Remove empty output sections
H. J. Lu
hjl@lucon.org
Fri Mar 18 09:59:00 GMT 2005
On Fri, Mar 18, 2005 at 01:45:47PM +1030, Alan Modra wrote:
> On Thu, Mar 17, 2005 at 06:59:25PM -0800, H. J. Lu wrote:
> > * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Set
> > bfd_section to bfd_abs_section_ptr when removing unused empty
> > output sections for non-relocatable link.
>
> No. The map file output needs to use the sections actually linked,
> otherwise wrong values will be reported.
>
Here it is.
H.J.
----
2005-03-17 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Don't set
bfd_section when removing unused empty output sections for
non-relocatable link.
--- ld/emultempl/elf32.em.abs 2005-03-16 21:20:12.000000000 -0800
+++ ld/emultempl/elf32.em 2005-03-17 19:49:00.600705303 -0800
@@ -1459,8 +1459,6 @@ gld${EMULATION_NAME}_finish (void)
{
asection **p;
- os->bfd_section = NULL;
-
for (p = &output_bfd->sections; *p; p = &(*p)->next)
if (*p == s)
{
More information about the Binutils
mailing list