This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Fix .tbss handling
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 26 Jul 2002 09:50:40 +0930
- Subject: Re: [PATCH] Fix .tbss handling
- References: <20020725182650.X20867@sunsite.ms.mff.cuni.cz>
On Thu, Jul 25, 2002 at 06:26:50PM +0200, Jakub Jelinek wrote:
> --- ld/ldlang.c.jj Thu Jul 18 11:38:46 2002
> +++ ld/ldlang.c Thu Jul 18 23:42:51 2002
> @@ -3055,7 +3055,8 @@ lang_size_sections_1 (s, output_section_
> if (bfd_is_abs_section (os->bfd_section))
> ASSERT (after == os->bfd_section->vma);
> else if ((os->bfd_section->flags & SEC_HAS_CONTENTS) == 0
> - && (os->bfd_section->flags & SEC_THREAD_LOCAL))
> + && (os->bfd_section->flags & SEC_THREAD_LOCAL)
> + && ! link_info.relocateable)
> os->bfd_section->_raw_size = 0;
> else
> os->bfd_section->_raw_size =
Dumb question. Why is it necessary to zero _raw_size here? If you
managed to set correct sizes here, then you wouldn't need hacks
elsewhere, eg. assign_file_positions_for_segments, and the new one
in elf_fake_sections.
--
Alan Modra
IBM OzLabs - Linux Technology Centre