From 704afa601f9abdd212d000ff61b1c6a32e085a0b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 30 Jul 2002 14:28:55 +0000 Subject: * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type. * ldlang.c (lang_add_section): Don't turn .tbss into normal sections for relocatable link. (lang_size_sections_1): Don't make .tbss zero size for relocatable link. --- ld/ldlang.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ld/ldlang.c') diff --git a/ld/ldlang.c b/ld/ldlang.c index ba14c63..c260829 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -1218,7 +1218,7 @@ lang_add_section (ptr, section, output, file) } /* For now make .tbss normal section. */ - if (flags & SEC_THREAD_LOCAL) + if ((flags & SEC_THREAD_LOCAL) && ! link_info.relocateable) flags |= SEC_LOAD; section->output_section->flags |= flags; @@ -3055,7 +3055,8 @@ lang_size_sections_1 (s, output_section_statement, prev, fill, dot, relax) 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 = -- cgit v1.1