This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Stripping empty sections
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Fri, 8 Jul 2005 15:33:59 +0930
- Subject: Re: Stripping empty sections
- References: <20050610103735.GB30603@bubble.grove.modra.org>
On Fri, Jun 10, 2005 at 08:07:35PM +0930, Alan Modra wrote:
> We now have everything in place to strip empty sections at the right
> time, before .dynsym space is allocated. Which means we shouldn't
> see those weird NOTYPE LOCAL DEFAULT UND syms any more, except for
> the very first entry of .dynsym, as it should be.
Oh well, that change exposed a few other problems. Most notable is that
all linker created sections need to have SEC_EXCLUDE set by the backends
if they are to be stripped, eg. .dynsym. Doing it this way allows the
backends to keep sections that are not sized until after
size_dynamic_sections, for example, the ppc64 stub sections. Of course,
that means that such sections won't be removed if they turn out to be
zero sized, which is why I've changed the ppc64 .brlt section name so
that it sits inside .rodata (or .data.rel.ro). Also affected are
targets that adjust dynamic sections during relaxation, like alpha.
For an example, see ld-alpha/tlsbinr.rd, where .rela.plt has reappeared.
HJ's strip_empty_sections would have removed this one, but I'm inclined
to think that it isn't worth running another pass through output
sections just to remove these odd cases (which probably won't happen
anyway with real objects).
bfd/
* elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
of the usual sections are found.
* elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
Strip .dynbss if it is zero size.
* elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
* elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
* elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
* elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
.dynsbss.
(i370_elf_finish_dynamic_sections): Don't attempt to write .got
when it is zero size.
* elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
of .dynbss and zero size sections.
* elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
it is zero size.
* elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
.dynbss if zero size.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
too.
* elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
* elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
* elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
* elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
.plt.* and .got.plt.* if zero size.
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
.got* and .dynbss if zero size.
* elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
* elf64-ppc.c (create_linkage_sections): Create branch lookup table
in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
reloc section.
(create_got_section): Always create new .got and .rela.got sections.
(ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
* elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
* elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
* elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
dynamic bss sections correctly.
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
.dynbss if zero size.
ld/
* ldlang.c (wild_sort): Formatting.
(strip_excluded_output_sections): Strip zero size sections here.
* emultempl/elf32.em (gld*_strip_empty_sections): Delete.
(gld*_finish): Don't call the above.
* emultempl/hppaelf.em (hppaelf_finish): Likewise.
* emultempl/ppc64elf.em (ppc_finish): Likewise.
ld/testsuite/
* ld-cris/pv32.s: Give expobj a size.
* ld-cris/pv32-1.d: Update.
* ld-alpha/tlsbin.dd: Update for empty section removal change.
* ld-alpha/tlsbin.sd: Likewise.
* ld-alpha/tlsbin.td: Likewise.
* ld-alpha/tlsbinr.dd: Likewise.
* ld-alpha/tlsbinr.rd: Likewise.
* ld-alpha/tlspic.dd: Likewise.
* ld-alpha/tlspic.rd: Likewise.
* ld-alpha/tlspic.sd: Likewise.
* ld-alpha/tlspic.td: Likewise.
* ld-arm/tls-lib.d: Likewise.
* ld-arm/tls-lib.r: Likewise.
* ld-cris/gotplt2.d: Likewise.
* ld-cris/gotplt3.d: Likewise.
* ld-cris/hiddef1.d: Likewise.
* ld-cris/libdso-10.d: Likewise.
* ld-cris/libdso-11.d: Likewise.
* ld-cris/libdso-12.d: Likewise.
* ld-cris/libdso-14.d: Likewise.
* ld-cris/libdso-2.d: Likewise.
* ld-i386/tlsnopic.dd: Likewise.
* ld-i386/tlsnopic.rd: Likewise.
* ld-i386/tlsnopic.sd: Likewise.
* ld-i386/tlspic.rd: Likewise.
* ld-mmix/bpo-10.d: Likewise.
* ld-mmix/bpo-22.d: Likewise.
* ld-mmix/sec-7m.d: Likewise.
* ld-powerpc/tlsexe.r: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlsso32.d: Likewise.
* ld-powerpc/tlsso32.g: Likewise.
* ld-powerpc/tlsso32.r: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-powerpc/tlstocso.r: Likewise.
Index: bfd/elf-hppa.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-hppa.h,v
retrieving revision 1.78
diff -u -p -r1.78 elf-hppa.h
--- bfd/elf-hppa.h 4 May 2005 15:53:07 -0000 1.78
+++ bfd/elf-hppa.h 7 Jul 2005 04:38:00 -0000
@@ -1259,9 +1259,9 @@ elf_hppa_final_link (bfd *abfd, struct b
if (!sec || (sec->flags & SEC_EXCLUDE))
sec = bfd_get_section_by_name (abfd, ".data");
if (!sec || (sec->flags & SEC_EXCLUDE))
- return FALSE;
-
- gp_val = sec->output_offset + sec->output_section->vma;
+ gp_val = 0;
+ else
+ gp_val = sec->output_offset + sec->output_section->vma;
}
}
Index: bfd/elf-m10300.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-m10300.c,v
retrieving revision 1.66
diff -u -p -r1.66 elf-m10300.c
--- bfd/elf-m10300.c 20 Jun 2005 18:12:06 -0000 1.66
+++ bfd/elf-m10300.c 7 Jul 2005 04:38:03 -0000
@@ -4221,7 +4221,6 @@ _bfd_mn10300_elf_size_dynamic_sections (
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char * name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -4230,34 +4229,14 @@ _bfd_mn10300_elf_size_dynamic_sections (
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
-
if (strcmp (name, ".plt") == 0)
{
- if (s->size == 0)
- /* Strip this section if we don't need it; see the
- comment below. */
- strip = TRUE;
- else
- /* Remember whether there is a PLT. */
- plt = TRUE;
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
asection * target;
@@ -4288,23 +4267,36 @@ _bfd_mn10300_elf_size_dynamic_sections (
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".got", 4) != 0)
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".dynbss") != 0)
/* It's not one of our sections, so don't allocate space. */
continue;
- if (strip)
+ if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
but this way if it does, we get a R_MN10300_NONE reloc
instead of garbage. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.47
diff -u -p -r1.47 elf32-arm.c
--- bfd/elf32-arm.c 5 Jul 2005 09:14:14 -0000 1.47
+++ bfd/elf32-arm.c 7 Jul 2005 04:38:06 -0000
@@ -5852,7 +5852,6 @@ elf32_arm_size_dynamic_sections (bfd * o
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char * name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -5861,38 +5860,14 @@ elf32_arm_size_dynamic_sections (bfd * o
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
-
if (strcmp (name, ".plt") == 0)
{
- if (s->size == 0)
- {
- /* Strip this section if we don't need it; see the
- comment below. */
- strip = TRUE;
- }
- else
- {
- /* Remember whether there is a PLT. */
- plt = TRUE;
- }
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
}
else if (strncmp (name, ".rel", 4) == 0)
{
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rel.bss and
- .rel.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
/* Remember whether there are any reloc sections other
than .rel.plt. */
@@ -5904,21 +5879,34 @@ elf32_arm_size_dynamic_sections (bfd * o
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".got", 4) != 0)
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
continue;
}
- if (strip)
+ if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rel.bss and
+ .rel.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
Index: bfd/elf32-cris.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-cris.c,v
retrieving revision 1.67
diff -u -p -r1.67 elf32-cris.c
--- bfd/elf32-cris.c 20 Jun 2005 18:12:06 -0000 1.67
+++ bfd/elf32-cris.c 7 Jul 2005 04:38:09 -0000
@@ -2935,7 +2935,6 @@ elf_cris_size_dynamic_sections (output_b
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -2944,38 +2943,14 @@ elf_cris_size_dynamic_sections (output_b
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
-
if (strcmp (name, ".plt") == 0)
{
- if (s->size == 0)
- {
- /* Strip this section if we don't need it; see the
- comment below. */
- strip = TRUE;
- }
- else
- {
- /* Remember whether there is a PLT. */
- plt = TRUE;
- }
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
/* Remember whether there are any reloc sections other
than .rela.plt. */
@@ -2987,25 +2962,38 @@ elf_cris_size_dynamic_sections (output_b
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".got", 4) != 0)
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
continue;
}
- if (strip)
+ if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc here
in case unused entries are not reclaimed before the section's
contents are written out. This should not happen, but this way
if it does, we will not write out garbage. For reloc sections,
this will make entries have the type R_CRIS_NONE. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
Index: bfd/elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.135
diff -u -p -r1.135 elf32-hppa.c
--- bfd/elf32-hppa.c 27 Jun 2005 23:43:43 -0000 1.135
+++ bfd/elf32-hppa.c 7 Jul 2005 04:38:12 -0000
@@ -2274,7 +2274,8 @@ elf32_hppa_size_dynamic_sections (bfd *o
sec->size = (sec->size + sizeof (plt_stub) + mask) & ~mask;
}
}
- else if (sec == htab->sgot)
+ else if (sec == htab->sgot
+ || sec == htab->sdynbss)
;
else if (strncmp (bfd_get_section_name (dynobj, sec), ".rela", 5) == 0)
{
@@ -2311,10 +2312,13 @@ elf32_hppa_size_dynamic_sections (bfd *o
continue;
}
+ if ((sec->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. Zero it, because
we may not fill in all the reloc sections. */
sec->contents = bfd_zalloc (dynobj, sec->size);
- if (sec->contents == NULL && sec->size != 0)
+ if (sec->contents == NULL)
return FALSE;
}
Index: bfd/elf32-i370.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i370.c,v
retrieving revision 1.48
diff -u -p -r1.48 elf32-i370.c
--- bfd/elf32-i370.c 1 Jul 2005 11:16:29 -0000 1.48
+++ bfd/elf32-i370.c 7 Jul 2005 04:38:12 -0000
@@ -635,7 +635,6 @@ i370_elf_size_dynamic_sections (bfd *out
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -643,32 +642,15 @@ i370_elf_size_dynamic_sections (bfd *out
/* It's OK to base decisions on the section name, because none
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
if (strcmp (name, ".plt") == 0)
{
- if (s->size == 0)
- /* Strip this section if we don't need it; see the
- comment below. */
- strip = TRUE;
- else
- /* Remember whether there is a PLT. */
- plt = TRUE;
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->size == 0)
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- else
+ if (s->size != 0)
{
asection *target;
const char *outname;
@@ -693,24 +675,35 @@ i370_elf_size_dynamic_sections (bfd *out
}
else if (strcmp (name, ".got") != 0
&& strcmp (name, ".sdata") != 0
- && strcmp (name, ".sdata2") != 0)
- /* It's not one of our sections, so don't allocate space. */
- continue;
+ && strcmp (name, ".sdata2") != 0
+ && strcmp (name, ".dynbss") != 0
+ && strcmp (name, ".dynsbss") != 0)
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
- if (strip)
+ if (s->size == 0)
{
- if (!bfd_section_removed_from_list (s->output_section->owner,
- s->output_section))
- {
- bfd_section_list_remove (s->output_section->owner,
- s->output_section);
- --s->output_section->owner->section_count;
- }
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ s->flags |= SEC_EXCLUDE;
continue;
}
+
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. */
s->contents = bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
@@ -965,7 +958,7 @@ i370_elf_finish_dynamic_sections (bfd *o
}
}
- if (sgot)
+ if (sgot && sgot->size != 0)
{
unsigned char *contents = sgot->contents;
Index: bfd/elf32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.143
diff -u -p -r1.143 elf32-i386.c
--- bfd/elf32-i386.c 20 Jun 2005 12:59:48 -0000 1.143
+++ bfd/elf32-i386.c 7 Jul 2005 04:38:14 -0000
@@ -1948,7 +1948,7 @@ elf_i386_size_dynamic_sections (bfd *out
continue;
}
- if (s->size == 0 && strip_section)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rel.bss and
@@ -1959,11 +1959,14 @@ elf_i386_size_dynamic_sections (bfd *out
adjust_dynamic_symbol is called, and it is that
function which decides whether anything needs to go
into these sections. */
-
- s->flags |= SEC_EXCLUDE;
+ if (strip_section)
+ s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
Index: bfd/elf32-m32r.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m32r.c,v
retrieving revision 1.67
diff -u -p -r1.67 elf32-m32r.c
--- bfd/elf32-m32r.c 5 Jul 2005 06:23:36 -0000 1.67
+++ bfd/elf32-m32r.c 7 Jul 2005 04:38:16 -0000
@@ -2264,7 +2264,8 @@ m32r_elf_size_dynamic_sections (bfd *out
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -2297,6 +2298,9 @@ m32r_elf_size_dynamic_sections (bfd *out
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
Index: bfd/elf32-m68k.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68k.c,v
retrieving revision 1.79
diff -u -p -r1.79 elf32-m68k.c
--- bfd/elf32-m68k.c 20 Jun 2005 18:12:07 -0000 1.79
+++ bfd/elf32-m68k.c 7 Jul 2005 04:38:17 -0000
@@ -1189,7 +1189,6 @@ elf_m68k_size_dynamic_sections (output_b
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -1198,38 +1197,14 @@ elf_m68k_size_dynamic_sections (output_b
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
-
if (strcmp (name, ".plt") == 0)
{
- if (s->size == 0)
- {
- /* Strip this section if we don't need it; see the
- comment below. */
- strip = TRUE;
- }
- else
- {
- /* Remember whether there is a PLT. */
- plt = TRUE;
- }
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
relocs = TRUE;
@@ -1238,18 +1213,31 @@ elf_m68k_size_dynamic_sections (output_b
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".got", 4) != 0)
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
continue;
}
- if (strip)
+ if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. */
/* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
Unused entries should be reclaimed before the section's contents
@@ -1257,7 +1245,7 @@ elf_m68k_size_dynamic_sections (output_b
order to prevent writing out garbage, we initialise the section's
contents to zero. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.170
diff -u -p -r1.170 elf32-ppc.c
--- bfd/elf32-ppc.c 5 Jul 2005 16:52:48 -0000 1.170
+++ bfd/elf32-ppc.c 7 Jul 2005 04:38:21 -0000
@@ -4708,7 +4708,9 @@ ppc_elf_size_dynamic_sections (bfd *outp
|| s == htab->glink
|| s == htab->got
|| s == htab->sgotplt
- || s == htab->sbss)
+ || s == htab->sbss
+ || s == htab->dynbss
+ || s == htab->dynsbss)
{
/* We'd like to strip these sections if they aren't needed, but if
we've exported dynamic symbols from them we must leave them.
@@ -4725,19 +4727,7 @@ ppc_elf_size_dynamic_sections (bfd *outp
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- }
- else
+ if (s->size != 0)
{
/* Remember whether there are any relocation sections. */
relocs = TRUE;
@@ -4755,6 +4745,15 @@ ppc_elf_size_dynamic_sections (bfd *outp
if (s->size == 0 && strip_section)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
Index: bfd/elf32-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-s390.c,v
retrieving revision 1.74
diff -u -p -r1.74 elf32-s390.c
--- bfd/elf32-s390.c 5 Jul 2005 09:44:20 -0000 1.74
+++ bfd/elf32-s390.c 7 Jul 2005 04:38:22 -0000
@@ -2105,7 +2105,8 @@ elf_s390_size_dynamic_sections (output_b
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -2141,6 +2142,9 @@ elf_s390_size_dynamic_sections (output_b
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
Index: bfd/elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.125
diff -u -p -r1.125 elf32-sh.c
--- bfd/elf32-sh.c 20 Jun 2005 18:12:07 -0000 1.125
+++ bfd/elf32-sh.c 7 Jul 2005 04:38:26 -0000
@@ -4354,7 +4354,8 @@ sh_elf_size_dynamic_sections (bfd *outpu
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -4390,6 +4391,9 @@ sh_elf_size_dynamic_sections (bfd *outpu
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
Index: bfd/elf32-vax.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-vax.c,v
retrieving revision 1.32
diff -u -p -r1.32 elf32-vax.c
--- bfd/elf32-vax.c 20 Jun 2005 18:12:08 -0000 1.32
+++ bfd/elf32-vax.c 7 Jul 2005 04:38:27 -0000
@@ -1173,7 +1173,6 @@ elf_vax_size_dynamic_sections (bfd *outp
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -1182,38 +1181,14 @@ elf_vax_size_dynamic_sections (bfd *outp
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
-
if (strcmp (name, ".plt") == 0)
{
- if (s->size == 0)
- {
- /* Strip this section if we don't need it; see the
- comment below. */
- strip = TRUE;
- }
- else
- {
- /* Remember whether there is a PLT. */
- plt = TRUE;
- }
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
asection *target;
@@ -1243,21 +1218,34 @@ elf_vax_size_dynamic_sections (bfd *outp
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".got", 4) != 0)
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
continue;
}
- if (strip)
+ if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
Index: bfd/elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.51
diff -u -p -r1.51 elf32-xtensa.c
--- bfd/elf32-xtensa.c 5 Jul 2005 06:23:37 -0000 1.51
+++ bfd/elf32-xtensa.c 7 Jul 2005 04:38:31 -0000
@@ -1409,7 +1409,6 @@ elf_xtensa_size_dynamic_sections (bfd *o
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -1418,37 +1417,23 @@ elf_xtensa_size_dynamic_sections (bfd *o
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
-
if (strncmp (name, ".rela", 5) == 0)
{
- if (strcmp (name, ".rela.plt") == 0)
- relplt = TRUE;
- else if (strcmp (name, ".rela.got") == 0)
- relgot = TRUE;
-
- /* We use the reloc_count field as a counter if we need
- to copy relocs into the output file. */
- s->reloc_count = 0;
- }
- else if (strncmp (name, ".plt.", 5) == 0
- || strncmp (name, ".got.plt.", 9) == 0)
- {
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the output
- file. We must create the ".plt*" and ".got.plt*"
- sections in create_dynamic_sections and/or check_relocs
- based on a conservative estimate of the PLT relocation
- count, because the sections must be created before the
- linker maps input sections to output sections. The
- linker does that before size_dynamic_sections, where we
- compute the exact size of the PLT, so there may be more
- of these sections than are actually needed. */
- strip = TRUE;
+ if (s->size != 0)
+ {
+ if (strcmp (name, ".rela.plt") == 0)
+ relplt = TRUE;
+ else if (strcmp (name, ".rela.got") == 0)
+ relgot = TRUE;
+
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
}
}
- else if (strcmp (name, ".got") != 0
+ else if (strncmp (name, ".plt.", 5) != 0
+ && strncmp (name, ".got.plt.", 9) != 0
+ && strcmp (name, ".got") != 0
&& strcmp (name, ".plt") != 0
&& strcmp (name, ".got.plt") != 0
&& strcmp (name, ".xt.lit.plt") != 0
@@ -1458,13 +1443,24 @@ elf_xtensa_size_dynamic_sections (bfd *o
continue;
}
- if (strip)
- s->flags |= SEC_EXCLUDE;
- else
+ if (s->size == 0)
+ {
+ /* If we don't need this section, strip it from the output
+ file. We must create the ".plt*" and ".got.plt*"
+ sections in create_dynamic_sections and/or check_relocs
+ based on a conservative estimate of the PLT relocation
+ count, because the sections must be created before the
+ linker maps input sections to output sections. The
+ linker does that before size_dynamic_sections, where we
+ compute the exact size of the PLT, so there may be more
+ of these sections than are actually needed. */
+ s->flags |= SEC_EXCLUDE;
+ }
+ else if ((s->flags & SEC_HAS_CONTENTS) != 0)
{
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
}
Index: bfd/elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.144
diff -u -p -r1.144 elf64-alpha.c
--- bfd/elf64-alpha.c 5 Jul 2005 06:23:37 -0000 1.144
+++ bfd/elf64-alpha.c 7 Jul 2005 04:38:34 -0000
@@ -2767,7 +2767,6 @@ elf64_alpha_size_dynamic_sections (bfd *
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if (!(s->flags & SEC_LINKER_CREATED))
continue;
@@ -2776,21 +2775,9 @@ elf64_alpha_size_dynamic_sections (bfd *
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- /* If we don't need this section, strip it from the output file.
- This is to handle .rela.bss and .rela.plt. We must create it
- in create_dynamic_sections, because it must be created before
- the linker maps input sections to output sections. The
- linker does that before adjust_dynamic_symbol is called, and
- it is that function which decides whether anything needs to
- go into these sections. */
-
- strip = FALSE;
-
if (strncmp (name, ".rela", 5) == 0)
{
- strip = (s->size == 0);
-
- if (!strip)
+ if (s->size != 0)
{
if (strcmp(name, ".rela.plt") == 0)
relplt = TRUE;
@@ -2800,19 +2787,30 @@ elf64_alpha_size_dynamic_sections (bfd *
s->reloc_count = 0;
}
}
- else if (strcmp (name, ".plt") != 0)
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".plt") != 0
+ && strcmp (name, ".dynbss") != 0)
{
/* It's not one of our dynamic sections, so don't allocate space. */
continue;
}
- if (strip)
- s->flags |= SEC_EXCLUDE;
- else
+ if (s->size == 0)
+ {
+ /* If we don't need this section, strip it from the output file.
+ This is to handle .rela.bss and .rela.plt. We must create it
+ in create_dynamic_sections, because it must be created before
+ the linker maps input sections to output sections. The
+ linker does that before adjust_dynamic_symbol is called, and
+ it is that function which decides whether anything needs to
+ go into these sections. */
+ s->flags |= SEC_EXCLUDE;
+ }
+ else if ((s->flags & SEC_HAS_CONTENTS) != 0)
{
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
}
Index: bfd/elf64-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-hppa.c,v
retrieving revision 1.61
diff -u -p -r1.61 elf64-hppa.c
--- bfd/elf64-hppa.c 5 Jul 2005 06:23:37 -0000 1.61
+++ bfd/elf64-hppa.c 7 Jul 2005 06:06:05 -0000
@@ -1699,7 +1699,6 @@ elf64_hppa_size_dynamic_sections (output
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -1708,60 +1707,21 @@ elf64_hppa_size_dynamic_sections (output
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = 0;
-
if (strcmp (name, ".plt") == 0)
{
- /* Strip this section if we don't need it; see the comment below. */
- if (s->size == 0)
- {
- strip = TRUE;
- }
- else
- {
- /* Remember whether there is a PLT. */
- plt = TRUE;
- }
- }
- else if (strcmp (name, ".dlt") == 0)
- {
- /* Strip this section if we don't need it; see the comment below. */
- if (s->size == 0)
- {
- strip = TRUE;
- }
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
}
- else if (strcmp (name, ".opd") == 0)
+ else if (strcmp (name, ".opd") == 0
+ || strncmp (name, ".dlt", 4) == 0
+ || strcmp (name, ".stub") == 0
+ || strcmp (name, ".got") == 0)
{
/* Strip this section if we don't need it; see the comment below. */
- if (s->size == 0)
- {
- strip = TRUE;
- }
}
else if (strncmp (name, ".rela", 5) == 0)
{
- /* If we don't need this section, strip it from the output file.
- This is mostly to handle .rela.bss and .rela.plt. We must
- create both sections in create_dynamic_sections, because they
- must be created before the linker maps input sections to output
- sections. The linker does that before adjust_dynamic_symbol
- is called, and it is that function which decides whether
- anything needs to go into these sections. */
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
asection *target;
@@ -1792,20 +1752,30 @@ elf64_hppa_size_dynamic_sections (output
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".dlt", 4) != 0
- && strcmp (name, ".stub") != 0
- && strcmp (name, ".got") != 0)
+ else
{
/* It's not one of our sections, so don't allocate space. */
continue;
}
- if (strip)
+ if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents if it has not
been allocated already. We use bfd_zalloc here in case
unused entries are not reclaimed before the section's
@@ -1815,7 +1785,7 @@ elf64_hppa_size_dynamic_sections (output
if (s->contents == NULL)
{
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
}
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.215
diff -u -p -r1.215 elf64-ppc.c
--- bfd/elf64-ppc.c 5 Jul 2005 15:07:43 -0000 1.215
+++ bfd/elf64-ppc.c 7 Jul 2005 04:38:41 -0000
@@ -3213,7 +3213,7 @@ struct ppc_branch_hash_entry {
/* Base hash table entry structure. */
struct bfd_hash_entry root;
- /* Offset within .branch_lt. */
+ /* Offset within branch lookup table. */
unsigned int offset;
/* Generation marker. */
@@ -3711,26 +3711,50 @@ create_linkage_sections (bfd *dynobj, st
|| ! bfd_set_section_alignment (dynobj, htab->glink, 2))
return FALSE;
- /* Create .branch_lt for plt_branch stubs. */
- flags = (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->brlt = bfd_make_section_anyway_with_flags (dynobj, ".branch_lt",
- flags);
+ /* Create branch lookup table for plt_branch stubs. */
+ if (info->shared)
+ {
+ flags = (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ htab->brlt
+ = bfd_make_section_anyway_with_flags (dynobj, ".data.rel.ro.brlt",
+ flags);
+ }
+ else
+ {
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ htab->brlt
+ = bfd_make_section_anyway_with_flags (dynobj, ".rodata.brlt", flags);
+ }
+
if (htab->brlt == NULL
|| ! bfd_set_section_alignment (dynobj, htab->brlt, 3))
return FALSE;
- if (info->shared || info->emitrelocations)
+ if (info->shared)
{
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->relbrlt = bfd_make_section_anyway_with_flags (dynobj,
- ".rela.branch_lt",
- flags);
- if (!htab->relbrlt
- || ! bfd_set_section_alignment (dynobj, htab->relbrlt, 3))
- return FALSE;
+ htab->relbrlt
+ = bfd_make_section_anyway_with_flags (dynobj, ".rela.data.rel.ro.brlt",
+ flags);
}
+ else if (info->emitrelocations)
+ {
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ htab->relbrlt
+ = bfd_make_section_anyway_with_flags (dynobj, ".rela.rodata.brlt",
+ flags);
+ }
+ else
+ return TRUE;
+
+ if (!htab->relbrlt
+ || ! bfd_set_section_alignment (dynobj, htab->relbrlt, 3))
+ return FALSE;
+
return TRUE;
}
@@ -3757,13 +3781,13 @@ create_got_section (bfd *abfd, struct bf
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED);
- got = bfd_make_section_with_flags (abfd, ".got", flags);
+ got = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
if (!got
|| !bfd_set_section_alignment (abfd, got, 3))
return FALSE;
- relgot = bfd_make_section_with_flags (abfd, ".rela.got",
- flags | SEC_READONLY);
+ relgot = bfd_make_section_anyway_with_flags (abfd, ".rela.got",
+ flags | SEC_READONLY);
if (!relgot
|| ! bfd_set_section_alignment (abfd, relgot, 3))
return FALSE;
@@ -7714,26 +7738,15 @@ ppc64_elf_size_dynamic_sections (bfd *ou
continue;
else if (s == htab->got
|| s == htab->plt
- || s == htab->glink)
+ || s == htab->glink
+ || s == htab->dynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- }
- else
+ if (s->size != 0)
{
if (s != htab->relplt)
relocs = TRUE;
@@ -7751,12 +7764,20 @@ ppc64_elf_size_dynamic_sections (bfd *ou
if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
- /* .plt is in the bss section. We don't initialise it. */
- if (s == htab->plt)
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
continue;
/* Allocate memory for the section contents. We use bfd_zalloc
@@ -9138,7 +9159,7 @@ ppc64_elf_size_stubs (bfd *output_bfd,
(*htab->layout_sections_again) ();
}
- /* It would be nice to strip .branch_lt from the output if the
+ /* It would be nice to strip htab->brlt from the output if the
section is empty, but it's too late. If we strip sections here,
the dynamic symbol table is corrupted since the section symbol
for the stripped section isn't written. */
Index: bfd/elf64-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-s390.c,v
retrieving revision 1.74
diff -u -p -r1.74 elf64-s390.c
--- bfd/elf64-s390.c 5 Jul 2005 09:44:18 -0000 1.74
+++ bfd/elf64-s390.c 7 Jul 2005 04:38:43 -0000
@@ -2076,7 +2076,8 @@ elf_s390_size_dynamic_sections (output_b
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -2112,6 +2113,9 @@ elf_s390_size_dynamic_sections (output_b
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
Index: bfd/elf64-sh64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sh64.c,v
retrieving revision 1.60
diff -u -p -r1.60 elf64-sh64.c
--- bfd/elf64-sh64.c 5 Jul 2005 06:23:37 -0000 1.60
+++ bfd/elf64-sh64.c 7 Jul 2005 04:38:44 -0000
@@ -3566,7 +3566,6 @@ sh64_elf64_size_dynamic_sections (bfd *o
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -3575,38 +3574,14 @@ sh64_elf64_size_dynamic_sections (bfd *o
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- strip = FALSE;
-
if (strcmp (name, ".plt") == 0)
{
- if (s->size == 0)
- {
- /* Strip this section if we don't need it; see the
- comment below. */
- strip = TRUE;
- }
- else
- {
- /* Remember whether there is a PLT. */
- plt = TRUE;
- }
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
}
else if (strncmp (name, ".rela", 5) == 0)
{
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
asection *target;
@@ -3637,21 +3612,34 @@ sh64_elf64_size_dynamic_sections (bfd *o
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".got", 4) != 0)
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
continue;
}
- if (strip)
+ if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
Index: bfd/elf64-x86-64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-x86-64.c,v
retrieving revision 1.98
diff -u -p -r1.98 elf64-x86-64.c
--- bfd/elf64-x86-64.c 5 Jul 2005 09:44:20 -0000 1.98
+++ bfd/elf64-x86-64.c 7 Jul 2005 04:38:46 -0000
@@ -1686,6 +1686,9 @@ elf64_x86_64_size_dynamic_sections (bfd
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.144
diff -u -p -r1.144 elfxx-mips.c
--- bfd/elfxx-mips.c 5 Jul 2005 06:23:37 -0000 1.144
+++ bfd/elfxx-mips.c 7 Jul 2005 04:38:52 -0000
@@ -6668,7 +6668,6 @@ _bfd_mips_elf_size_dynamic_sections (bfd
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
/* It's OK to base decisions on the section name, because none
of the dynobj section names depend upon the input files. */
@@ -6677,24 +6676,9 @@ _bfd_mips_elf_size_dynamic_sections (bfd
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
- strip = FALSE;
-
if (strncmp (name, ".rel", 4) == 0)
{
- if (s->size == 0)
- {
- /* We only strip the section if the output section name
- has the same name. Otherwise, there might be several
- input sections for this output section. FIXME: This
- code is probably not needed these days anyhow, since
- the linker now does not create empty output sections. */
- if (s->output_section != NULL
- && strcmp (name,
- bfd_get_section_name (s->output_section->owner,
- s->output_section)) == 0)
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
const char *outname;
asection *target;
@@ -6818,15 +6802,18 @@ _bfd_mips_elf_size_dynamic_sections (bfd
continue;
}
- if (strip)
+ if (s->size == 0)
{
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. */
s->contents = bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
{
bfd_set_error (bfd_error_no_memory);
return FALSE;
Index: bfd/elfxx-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-sparc.c,v
retrieving revision 1.10
diff -u -p -r1.10 elfxx-sparc.c
--- bfd/elfxx-sparc.c 5 Jul 2005 09:44:18 -0000 1.10
+++ bfd/elfxx-sparc.c 7 Jul 2005 04:38:54 -0000
@@ -2152,55 +2152,54 @@ _bfd_sparc_elf_size_dynamic_sections (bf
memory for them. */
for (s = dynobj->sections; s != NULL; s = s->next)
{
- const char *name;
- bfd_boolean strip = FALSE;
-
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
- /* It's OK to base decisions on the section name, because none
- of the dynobj section names depend upon the input files. */
- name = bfd_get_section_name (dynobj, s);
-
- if (strncmp (name, ".rela", 5) == 0)
- {
- if (s->size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is to handle .rela.bss and
- .rel.plt. We must create it in
- create_dynamic_sections, because it must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
+ if (s == htab->splt
+ || s == htab->sgot
+ || s == htab->sdynbss)
+ {
+ /* Strip this section if we don't need it; see the
+ comment below. */
+ }
+ else if (strncmp (s->name, ".rela", 5) == 0)
+ {
+ if (s->size != 0)
{
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
s->reloc_count = 0;
}
}
- else if (s != htab->splt && s != htab->sgot)
+ else
{
- /* It's not one of our sections, so don't allocate space. */
+ /* It's not one of our sections. */
continue;
}
- if (strip)
+ if (s->size == 0)
{
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. Zero the memory
for the benefit of .rela.plt, which has 4 unused entries
at the beginning, and we don't want garbage. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
+ if (s->contents == NULL)
return FALSE;
}
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.189
diff -u -p -r1.189 ldlang.c
--- ld/ldlang.c 9 Jun 2005 02:05:46 -0000 1.189
+++ ld/ldlang.c 7 Jul 2005 04:39:27 -0000
@@ -1960,11 +1960,8 @@ wild_sort (lang_wild_statement_type *wil
looking at the sections for this file. */
if (sec != NULL && sec->spec.sorted != none)
- {
- if (compare_section (sec->spec.sorted, section,
- ls->section) < 0)
- break;
- }
+ if (compare_section (sec->spec.sorted, section, ls->section) < 0)
+ break;
}
return l;
@@ -3086,39 +3083,40 @@ strip_excluded_output_sections (void)
if (output_section == NULL)
continue;
- exclude = TRUE;
- if (output_section->map_head.s != NULL)
+ exclude = (output_section->rawsize == 0
+ && (output_section->flags & SEC_KEEP) == 0
+ && !bfd_section_removed_from_list (output_bfd,
+ output_section));
+
+ /* Some sections have not yet been sized, notably .gnu.version,
+ .dynsym, .dynstr and .hash. These all have SEC_LINKER_CREATED
+ input sections, so don't drop output sections that have such
+ input sections unless they are also marked SEC_EXCLUDE. */
+ if (exclude && output_section->map_head.s != NULL)
{
asection *s;
- for (s = output_section->map_head.s; s != NULL;
- s = s->map_head.s)
- if ((s->flags & SEC_EXCLUDE) == 0)
+ for (s = output_section->map_head.s; s != NULL; s = s->map_head.s)
+ if ((s->flags & SEC_LINKER_CREATED) != 0
+ && (s->flags & SEC_EXCLUDE) == 0)
{
exclude = FALSE;
break;
}
-
- output_section->map_head.link_order = NULL;
- output_section->map_tail.link_order = NULL;
}
- if (exclude
- && (output_section->flags & SEC_KEEP) == 0
- && output_section->rawsize == 0
- && !bfd_is_abs_section (output_section))
+ /* TODO: Don't just junk map_head.s, turn them into link_orders. */
+ output_section->map_head.link_order = NULL;
+ output_section->map_tail.link_order = NULL;
+
+ if (exclude)
{
/* We don't set bfd_section to NULL since bfd_section of the
removed output section statement may still be used. */
os->ignored = TRUE;
output_section->flags |= SEC_EXCLUDE;
-
- if (!bfd_section_removed_from_list (output_bfd,
- output_section))
- {
- bfd_section_list_remove (output_bfd, output_section);
- output_bfd->section_count--;
- }
+ bfd_section_list_remove (output_bfd, output_section);
+ output_bfd->section_count--;
}
}
Index: ld/emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.149
diff -u -p -r1.149 elf32.em
--- ld/emultempl/elf32.em 4 Jul 2005 04:04:19 -0000 1.149
+++ ld/emultempl/elf32.em 7 Jul 2005 04:39:29 -0000
@@ -61,7 +61,6 @@ static void gld${EMULATION_NAME}_before_
static bfd_boolean gld${EMULATION_NAME}_place_orphan
(lang_input_statement_type *file, asection *s);
static void gld${EMULATION_NAME}_layout_sections_again (void);
-static void gld${EMULATION_NAME}_strip_empty_sections (void);
static void gld${EMULATION_NAME}_provide_init_fini_syms (void);
static void gld${EMULATION_NAME}_finish (void) ATTRIBUTE_UNUSED;
@@ -1507,40 +1506,11 @@ gld${EMULATION_NAME}_layout_sections_aga
}
static void
-gld${EMULATION_NAME}_strip_empty_sections (void)
-{
- if (!link_info.relocatable)
- {
- lang_output_section_statement_type *os;
-
- for (os = &lang_output_section_statement.head->output_section_statement;
- os != NULL;
- os = os->next)
- {
- asection *s;
-
- if (os == abs_output_section || os->constraint == -1)
- continue;
- s = os->bfd_section;
- if (s != NULL
- && s->size == 0
- && (s->flags & SEC_KEEP) == 0
- && !bfd_section_removed_from_list (output_bfd, s))
- {
- bfd_section_list_remove (output_bfd, s);
- output_bfd->section_count--;
- }
- }
- }
-}
-
-static void
gld${EMULATION_NAME}_finish (void)
{
if (bfd_elf_discard_info (output_bfd, &link_info))
gld${EMULATION_NAME}_layout_sections_again ();
- gld${EMULATION_NAME}_strip_empty_sections ();
gld${EMULATION_NAME}_provide_init_fini_syms ();
}
EOF
Index: ld/emultempl/hppaelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/hppaelf.em,v
retrieving revision 1.41
diff -u -p -r1.41 hppaelf.em
--- ld/emultempl/hppaelf.em 12 May 2005 07:32:03 -0000 1.41
+++ ld/emultempl/hppaelf.em 7 Jul 2005 04:39:29 -0000
@@ -305,7 +305,6 @@ hppaelf_finish (void)
}
}
- gld${EMULATION_NAME}_strip_empty_sections ();
gld${EMULATION_NAME}_provide_init_fini_syms ();
}
Index: ld/emultempl/ppc64elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc64elf.em,v
retrieving revision 1.45
diff -u -p -r1.45 ppc64elf.em
--- ld/emultempl/ppc64elf.em 9 Jun 2005 02:05:47 -0000 1.45
+++ ld/emultempl/ppc64elf.em 7 Jul 2005 04:39:29 -0000
@@ -379,7 +379,6 @@ ppc_finish (void)
}
ppc64_elf_restore_symbols (&link_info);
- gld${EMULATION_NAME}_strip_empty_sections ();
gld${EMULATION_NAME}_provide_init_fini_syms ();
}
Index: ld/testsuite/ld-alpha/tlsbin.dd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlsbin.dd,v
retrieving revision 1.3
diff -u -p -r1.3 tlsbin.dd
--- ld/testsuite/ld-alpha/tlsbin.dd 5 Mar 2005 12:03:13 -0000 1.3
+++ ld/testsuite/ld-alpha/tlsbin.dd 7 Jul 2005 04:39:30 -0000
@@ -12,30 +12,30 @@ Disassembly of section \.text:
0+120001000 <fn2>:
120001000: 02 00 bb 27 ldah gp,2\(t12\)
- 120001004: 00 a0 bd 23 lda gp,-24576\(gp\)
+ 120001004: c0 82 bd 23 lda gp,-32064\(gp\)
120001008: 3e 15 c2 43 subq sp,0x10,sp
12000100c: 00 00 5e b7 stq ra,0\(sp\)
120001010: 18 80 1d 22 lda a0,-32744\(gp\)
120001014: 08 80 7d a7 ldq t12,-32760\(gp\)
120001018: 00 40 5b 6b jsr ra,\(t12\),12000101c <.*>
12000101c: 02 00 ba 27 ldah gp,2\(ra\)
- 120001020: e4 9f bd 23 lda gp,-24604\(gp\)
+ 120001020: a4 82 bd 23 lda gp,-32092\(gp\)
120001024: 38 80 1d 22 lda a0,-32712\(gp\)
120001028: 08 80 7d a7 ldq t12,-32760\(gp\)
12000102c: 00 40 5b 6b jsr ra,\(t12\),120001030 <.*>
120001030: 02 00 ba 27 ldah gp,2\(ra\)
- 120001034: d0 9f bd 23 lda gp,-24624\(gp\)
+ 120001034: 90 82 bd 23 lda gp,-32112\(gp\)
120001038: 28 80 1d 22 lda a0,-32728\(gp\)
12000103c: 08 80 7d a7 ldq t12,-32760\(gp\)
120001040: 00 40 5b 6b jsr ra,\(t12\),120001044 <.*>
120001044: 02 00 ba 27 ldah gp,2\(ra\)
- 120001048: bc 9f bd 23 lda gp,-24644\(gp\)
+ 120001048: 7c 82 bd 23 lda gp,-32132\(gp\)
12000104c: 21 00 20 20 lda t0,33\(v0\)
120001050: 28 80 1d 22 lda a0,-32728\(gp\)
120001054: 08 80 7d a7 ldq t12,-32760\(gp\)
120001058: 00 40 5b 6b jsr ra,\(t12\),12000105c <.*>
12000105c: 02 00 ba 27 ldah gp,2\(ra\)
- 120001060: a4 9f bd 23 lda gp,-24668\(gp\)
+ 120001060: 64 82 bd 23 lda gp,-32156\(gp\)
120001064: 40 00 20 20 lda t0,64\(v0\)
120001068: 46 00 20 20 lda t0,70\(v0\)
12000106c: 00 00 20 24 ldah t0,0\(v0\)
Index: ld/testsuite/ld-alpha/tlsbin.sd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlsbin.sd,v
retrieving revision 1.4
diff -u -p -r1.4 tlsbin.sd
--- ld/testsuite/ld-alpha/tlsbin.sd 5 Mar 2005 12:03:13 -0000 1.4
+++ ld/testsuite/ld-alpha/tlsbin.sd 7 Jul 2005 04:39:30 -0000
@@ -9,7 +9,7 @@
.*: +file format elf64-alpha
Contents of section .got:
- [0-9a-f]+ 00000000 00000000 c0210120 01000000 .*
+ [0-9a-f]+ 00000000 00000000 b0120120 01000000 .*
[0-9a-f]+ 56000000 00000000 00000000 00000000 .*
[0-9a-f]+ 00000000 00000000 01000000 00000000 .*
[0-9a-f]+ 00000000 00000000 01000000 00000000 .*
Index: ld/testsuite/ld-alpha/tlsbin.td
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlsbin.td,v
retrieving revision 1.2
diff -u -p -r1.2 tlsbin.td
--- ld/testsuite/ld-alpha/tlsbin.td 23 Jan 2003 22:37:21 -0000 1.2
+++ ld/testsuite/ld-alpha/tlsbin.td 7 Jul 2005 04:39:30 -0000
@@ -9,9 +9,9 @@
.*: +file format elf64-alpha
Contents of section .tdata:
- 1?20012000 11000000 12000000 13000000 14000000 .*
- 1?20012010 15000000 16000000 17000000 18000000 .*
- 1?20012020 41000000 42000000 43000000 44000000 .*
- 1?20012030 45000000 46000000 47000000 48000000 .*
- 1?20012040 01010000 02010000 03010000 04010000 .*
- 1?20012050 05010000 06010000 07010000 08010000 .*
+ 1?200110f0 11000000 12000000 13000000 14000000 .*
+ 1?20011100 15000000 16000000 17000000 18000000 .*
+ 1?20011110 41000000 42000000 43000000 44000000 .*
+ 1?20011120 45000000 46000000 47000000 48000000 .*
+ 1?20011130 01010000 02010000 03010000 04010000 .*
+ 1?20011140 05010000 06010000 07010000 08010000 .*
Index: ld/testsuite/ld-alpha/tlsbinr.dd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlsbinr.dd,v
retrieving revision 1.3
diff -u -p -r1.3 tlsbinr.dd
--- ld/testsuite/ld-alpha/tlsbinr.dd 5 Mar 2005 12:03:13 -0000 1.3
+++ ld/testsuite/ld-alpha/tlsbinr.dd 7 Jul 2005 04:39:30 -0000
@@ -12,7 +12,7 @@ Disassembly of section \.text:
0+120001000 <fn2>:
120001000: 02 00 bb 27 ldah gp,2\(t12\)
- 120001004: 00 a0 bd 23 lda gp,-24576\(gp\)
+ 120001004: 90 82 bd 23 lda gp,-32112\(gp\)
120001008: 3e 15 c2 43 subq sp,0x10,sp
12000100c: 00 00 5e b7 stq ra,0\(sp\)
120001010: 08 80 1d a6 ldq a0,-32760\(gp\)
@@ -25,13 +25,13 @@ Disassembly of section \.text:
12000102c: 9e 00 00 00 rduniq
120001030: 00 04 00 42 addq a0,v0,v0
120001034: 00 00 fe 2f unop
- 120001038: 00 00 1f 22 lda a0,0
+ 120001038: 10 00 1f 22 lda a0,16
12000103c: 00 00 fe 2f unop
120001040: 9e 00 00 00 rduniq
120001044: 00 04 00 42 addq a0,v0,v0
120001048: 00 00 fe 2f unop
12000104c: 21 00 20 20 lda t0,33\(v0\)
- 120001050: 00 00 1f 22 lda a0,0
+ 120001050: 10 00 1f 22 lda a0,16
120001054: 00 00 fe 2f unop
120001058: 9e 00 00 00 rduniq
12000105c: 00 04 00 42 addq a0,v0,v0
Index: ld/testsuite/ld-alpha/tlsbinr.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlsbinr.rd,v
retrieving revision 1.4
diff -u -p -r1.4 tlsbinr.rd
--- ld/testsuite/ld-alpha/tlsbinr.rd 16 Mar 2005 21:52:45 -0000 1.4
+++ ld/testsuite/ld-alpha/tlsbinr.rd 7 Jul 2005 04:39:30 -0000
@@ -11,21 +11,22 @@ There are [0-9]+ section headers, starti
Section Headers:
+\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
+\[ 0\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
- +\[ 1\] .interp +.*
- +\[ 2\] .hash +.*
- +\[ 3\] .dynsym +.*
- +\[ 4\] .dynstr +.*
- +\[ 5\] .rela.dyn +.*
- +\[ 6\] .text +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ +AX +0 +0 4096
- +\[ 7\] .eh_frame +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +A +0 +0 +8
- +\[ 8\] .tdata +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ WAT +0 +0 +4
- +\[ 9\] .tbss +NOBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ WAT +0 +0 +1
- +\[10\] .dynamic +DYNAMIC +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 10 +WA +4 +0 +8
- +\[11\] .plt +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ WAX +0 +0 +8
- +\[12\] .got +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ +WA +0 +0 +8
- +\[13\] .shstrtab +.*
- +\[14\] .symtab +.*
- +\[15\] .strtab +.*
+ +\[ 1\] \.interp +.*
+ +\[ 2\] \.hash +.*
+ +\[ 3\] \.dynsym +.*
+ +\[ 4\] \.dynstr +.*
+ +\[ 5\] \.rela\.dyn +.*
+ +\[ 6\] \.rela\.plt +.*
+ +\[ 7\] \.text +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ +AX +0 +0 4096
+ +\[ 8\] \.eh_frame +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +A +0 +0 +8
+ +\[ 9\] \.tdata +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ WAT +0 +0 +4
+ +\[10\] \.tbss +NOBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ WAT +0 +0 +1
+ +\[11\] \.dynamic +DYNAMIC +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 10 +WA +4 +0 +8
+ +\[12\] \.plt +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ WAX +0 +0 +16
+ +\[13\] \.got +PROGBITS +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 0+ +WA +0 +0 +8
+ +\[14\] \.shstrtab +.*
+ +\[15\] \.symtab +.*
+ +\[16\] \.strtab +.*
#...
Elf file type is EXEC \(Executable file\)
@@ -61,7 +62,7 @@ Symbol table '.dynsym' contains 10 entri
+8: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+9: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
-Symbol table '.symtab' contains 67 entries:
+Symbol table '.symtab' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1
@@ -79,54 +80,55 @@ Symbol table '.symtab' contains 67 entri
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +8 sl1
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +8 sl2
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +8 sl3
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +8 sl4
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +8 sl5
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +8 sl6
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +8 sl7
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +8 sl8
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 bl1
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 bl2
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 bl3
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 bl4
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 bl5
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 bl6
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 bl7
- +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 bl8
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +8 sg8
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 bg8
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 bg6
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 bg3
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +16
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 sl1
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 sl2
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 sl3
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 sl4
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 sl5
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 sl6
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 sl7
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +9 sl8
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +10 bl1
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +10 bl2
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +10 bl3
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +10 bl4
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +10 bl5
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +10 bl6
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +10 bl7
+ +[0-9]+: [0-9a-f]+ +0 TLS +LOCAL +DEFAULT +10 bl8
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 sg8
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +10 bg8
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +10 bg6
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +10 bg3
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +8 sg3
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +8 sh3
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 sg3
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +9 sh3
+[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +UND sG2
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +8 sg4
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +8 sg5
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 sg4
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 sg5
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +ABS _PROCEDURE_LINKAGE_TABLE_
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 bg5
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +10 bg5
+[0-9]+: [0-9a-f]+ +4 FUNC +GLOBAL DEFAULT +UND __tls_get_addr
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +8 sh7
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +8 sh8
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +8 sg1
- +[0-9]+: [0-9a-f]+ +52 FUNC +GLOBAL DEFAULT +6 _start
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +8 sh4
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 bg7
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +8 sh5
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +9 sh7
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +9 sh8
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 sg1
+ +[0-9]+: [0-9a-f]+ +52 FUNC +GLOBAL DEFAULT +7 _start
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +9 sh4
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +10 bg7
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +9 sh5
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
- +[0-9]+: [0-9a-f]+ +136 FUNC +GLOBAL DEFAULT +6 fn2
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +8 sg2
+ +[0-9]+: [0-9a-f]+ +136 FUNC +GLOBAL DEFAULT +7 fn2
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 sg2
+[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +UND sG1
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +8 sh1
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +8 sg6
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +8 sg7
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +9 sh1
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 sg6
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 sg7
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +8 sh2
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +8 sh6
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 bg2
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 bg1
- +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +9 bg4
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +9 sh2
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL HIDDEN +9 sh6
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +10 bg2
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +10 bg1
+ +[0-9]+: [0-9a-f]+ +0 TLS +GLOBAL DEFAULT +10 bg4
Index: ld/testsuite/ld-alpha/tlspic.dd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlspic.dd,v
retrieving revision 1.3
diff -u -p -r1.3 tlspic.dd
--- ld/testsuite/ld-alpha/tlspic.dd 5 Mar 2005 12:03:13 -0000 1.3
+++ ld/testsuite/ld-alpha/tlspic.dd 7 Jul 2005 04:39:30 -0000
@@ -12,7 +12,7 @@ Disassembly of section .text:
0+1000 <fn1>:
1000: 02 00 bb 27 ldah gp,2\(t12\)
- 1004: 00 a0 bd 23 lda gp,-24576\(gp\)
+ 1004: a0 82 bd 23 lda gp,-32096\(gp\)
1008: 3e 15 c2 43 subq sp,0x10,sp
100c: 00 00 5e b7 stq ra,0\(sp\)
1010: 08 00 3e b5 stq s0,8\(sp\)
@@ -22,23 +22,23 @@ Disassembly of section .text:
1020: 00 80 7d a7 ldq t12,-32768\(gp\)
1024: 00 40 5b 6b jsr ra,\(t12\),1028 <.*>
1028: 02 00 ba 27 ldah gp,2\(ra\)
- 102c: d8 9f bd 23 lda gp,-24616\(gp\)
+ 102c: 78 82 bd 23 lda gp,-32136\(gp\)
1030: 30 80 1d 22 lda a0,-32720\(gp\)
1034: 00 80 7d a7 ldq t12,-32768\(gp\)
1038: 00 40 5b 6b jsr ra,\(t12\),103c <.*>
103c: 02 00 ba 27 ldah gp,2\(ra\)
- 1040: c4 9f bd 23 lda gp,-24636\(gp\)
+ 1040: 64 82 bd 23 lda gp,-32156\(gp\)
1044: 40 80 1d 22 lda a0,-32704\(gp\)
1048: 00 80 7d a7 ldq t12,-32768\(gp\)
104c: 00 40 5b 6b jsr ra,\(t12\),1050 <.*>
1050: 02 00 ba 27 ldah gp,2\(ra\)
- 1054: b0 9f bd 23 lda gp,-24656\(gp\)
+ 1054: 50 82 bd 23 lda gp,-32176\(gp\)
1058: 21 00 20 20 lda t0,33\(v0\)
105c: 40 80 1d 22 lda a0,-32704\(gp\)
1060: 00 80 7d a7 ldq t12,-32768\(gp\)
1064: 00 40 5b 6b jsr ra,\(t12\),1068 <.*>
1068: 02 00 ba 27 ldah gp,2\(ra\)
- 106c: 98 9f bd 23 lda gp,-24680\(gp\)
+ 106c: 38 82 bd 23 lda gp,-32200\(gp\)
1070: 40 00 20 20 lda t0,64\(v0\)
1074: 62 00 20 20 lda t0,98\(v0\)
1078: 00 00 20 24 ldah t0,0\(v0\)
Index: ld/testsuite/ld-alpha/tlspic.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlspic.rd,v
retrieving revision 1.4
diff -u -p -r1.4 tlspic.rd
--- ld/testsuite/ld-alpha/tlspic.rd 16 Mar 2005 21:52:46 -0000 1.4
+++ ld/testsuite/ld-alpha/tlspic.rd 7 Jul 2005 04:39:30 -0000
@@ -37,7 +37,7 @@ Program Headers:
+LOAD +0x0+ 0x0+ 0x0+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
+LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
+DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
- +TLS +0x0+2000 0x0+12000 0x0+12000 0x0+60 0x0+80 R +0x4
+ +TLS +0x0+10e0 0x0+110e0 0x0+110e0 0x0+60 0x0+80 R +0x4
#...
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 7 entries:
@@ -61,8 +61,6 @@ Symbol table '.dynsym' contains [0-9]+ e
.* [0-9a-f]+ 0 SECTION LOCAL DEFAULT 7
.* [0-9a-f]+ 0 SECTION LOCAL DEFAULT 8
.* [0-9a-f]+ 0 SECTION LOCAL DEFAULT 9
-.* [0-9a-f]+ 0 NOTYPE LOCAL DEFAULT UND
-.* [0-9a-f]+ 0 NOTYPE LOCAL DEFAULT UND
.* [0-9a-f]+ 0 TLS GLOBAL DEFAULT 8 sg8
.* [0-9a-f]+ 0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
.* [0-9a-f]+ 0 TLS GLOBAL DEFAULT 8 sg3
Index: ld/testsuite/ld-alpha/tlspic.sd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlspic.sd,v
retrieving revision 1.3
diff -u -p -r1.3 tlspic.sd
--- ld/testsuite/ld-alpha/tlspic.sd 5 Mar 2005 12:03:13 -0000 1.3
+++ ld/testsuite/ld-alpha/tlspic.sd 7 Jul 2005 04:39:30 -0000
@@ -9,9 +9,9 @@
.*: +file format elf64-alpha
Contents of section .got:
- 13000 b0210100 00000000 00000000 00000000 .*
- 13010 00000000 00000000 71000000 00000000 .*
- 13020 00000000 00000000 00000000 00000000 .*
- 13030 00000000 00000000 44000000 00000000 .*
- 13040 00000000 00000000 00000000 00000000 .*
- 13050 00000000 00000000 .*
+ 112a0 90120100 00000000 00000000 00000000 .*
+ 112b0 00000000 00000000 71000000 00000000 .*
+ 112c0 00000000 00000000 00000000 00000000 .*
+ 112d0 00000000 00000000 44000000 00000000 .*
+ 112e0 00000000 00000000 00000000 00000000 .*
+ 112f0 00000000 00000000 .*
Index: ld/testsuite/ld-alpha/tlspic.td
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-alpha/tlspic.td,v
retrieving revision 1.1
diff -u -p -r1.1 tlspic.td
--- ld/testsuite/ld-alpha/tlspic.td 22 Jan 2003 00:41:59 -0000 1.1
+++ ld/testsuite/ld-alpha/tlspic.td 7 Jul 2005 04:39:30 -0000
@@ -9,9 +9,9 @@
.*: +file format elf64-alpha
Contents of section .tdata:
- 12000 11000000 12000000 13000000 14000000 .*
- 12010 15000000 16000000 17000000 18000000 .*
- 12020 41000000 42000000 43000000 44000000 .*
- 12030 45000000 46000000 47000000 48000000 .*
- 12040 01010000 02010000 03010000 04010000 .*
- 12050 05010000 06010000 07010000 08010000 .*
+ 110e0 11000000 12000000 13000000 14000000 .*
+ 110f0 15000000 16000000 17000000 18000000 .*
+ 11100 41000000 42000000 43000000 44000000 .*
+ 11110 45000000 46000000 47000000 48000000 .*
+ 11120 01010000 02010000 03010000 04010000 .*
+ 11130 05010000 06010000 07010000 08010000 .*
Index: ld/testsuite/ld-arm/tls-lib.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-arm/tls-lib.d,v
retrieving revision 1.2
diff -u -p -r1.2 tls-lib.d
--- ld/testsuite/ld-arm/tls-lib.d 29 Mar 2005 16:54:22 -0000 1.2
+++ ld/testsuite/ld-arm/tls-lib.d 7 Jul 2005 04:39:30 -0000
@@ -6,10 +6,10 @@ start address 0x.*
Disassembly of section .text:
-00000328 <foo>:
- 328: e1a00000 nop \(mov r0,r0\)
- 32c: e1a00000 nop \(mov r0,r0\)
- 330: e1a0f00e mov pc, lr
- 334: 00008098 muleq r0, r8, r0
- 338: 0000808c andeq r8, r0, ip, lsl #1
- 33c: 00000004 andeq r0, r0, r4
+00000314 <foo>:
+ 314: e1a00000 nop \(mov r0,r0\)
+ 318: e1a00000 nop \(mov r0,r0\)
+ 31c: e1a0f00e mov pc, lr
+ 320: 00008098 muleq r0, r8, r0
+ 324: 0000808c andeq r8, r0, ip, lsl #1
+ 328: 00000004 andeq r0, r0, r4
Index: ld/testsuite/ld-arm/tls-lib.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-arm/tls-lib.r,v
retrieving revision 1.2
diff -u -p -r1.2 tls-lib.r
--- ld/testsuite/ld-arm/tls-lib.r 29 Mar 2005 16:54:22 -0000 1.2
+++ ld/testsuite/ld-arm/tls-lib.r 7 Jul 2005 04:39:30 -0000
@@ -3,8 +3,8 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-000083c4 R_ARM_TLS_DTPMOD32 \*ABS\*
-000083cc R_ARM_TLS_DTPMOD32 lib_gd
-000083d0 R_ARM_TLS_DTPOFF32 lib_gd
+000083b0 R_ARM_TLS_DTPMOD32 \*ABS\*
+000083b8 R_ARM_TLS_DTPMOD32 lib_gd
+000083bc R_ARM_TLS_DTPOFF32 lib_gd
Index: ld/testsuite/ld-cris/gotplt2.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/gotplt2.d,v
retrieving revision 1.5
diff -u -p -r1.5 gotplt2.d
--- ld/testsuite/ld-cris/gotplt2.d 23 Mar 2005 19:04:33 -0000 1.5
+++ ld/testsuite/ld-cris/gotplt2.d 7 Jul 2005 04:39:30 -0000
@@ -16,22 +16,22 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-00002274 R_CRIS_GLOB_DAT dsofn
+0000224c R_CRIS_GLOB_DAT dsofn
Contents of section .*
#...
Contents of section \.rela\.got:
- 01cc 74220000 0a0b0000 00000000 .*
+ 01a4 4c220000 0a090000 00000000 .*
Contents of section \.text:
- 01d8 5f1d0c00 30096f1d 0c000000 30090000 .*
- 01e8 6f0d0c00 0000611a 6f3e88df ffff0000 .*
+ 01b0 5f1d0c00 30096f1d 0c000000 30090000 .*
+ 01c0 6f0d0c00 0000611a 6f3e88df ffff0000 .*
Contents of section \.dynamic:
- 21f8 04000000 94000000 05000000 98010000 .*
- 2208 06000000 d8000000 0a000000 33000000 .*
- 2218 0b000000 10000000 07000000 cc010000 .*
- 2228 08000000 0c000000 09000000 0c000000 .*
- 2238 00000000 00000000 00000000 00000000 .*
- 2248 00000000 00000000 00000000 00000000 .*
- 2258 00000000 00000000 00000000 00000000 .*
+ 21d0 04000000 94000000 05000000 70010000 .*
+ 21e0 06000000 d0000000 0a000000 33000000 .*
+ 21f0 0b000000 10000000 07000000 a4010000 .*
+ 2200 08000000 0c000000 09000000 0c000000 .*
+ 2210 00000000 00000000 00000000 00000000 .*
+ 2220 00000000 00000000 00000000 00000000 .*
+ 2230 00000000 00000000 00000000 00000000 .*
Contents of section \.got:
- 2268 f8210000 00000000 00000000 00000000 .*
+ 2240 d0210000 00000000 00000000 00000000 .*
Index: ld/testsuite/ld-cris/gotplt3.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/gotplt3.d,v
retrieving revision 1.5
diff -u -p -r1.5 gotplt3.d
--- ld/testsuite/ld-cris/gotplt3.d 23 Mar 2005 19:04:33 -0000 1.5
+++ ld/testsuite/ld-cris/gotplt3.d 7 Jul 2005 04:39:30 -0000
@@ -13,23 +13,23 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-00002278 R_CRIS_GLOB_DAT dsofn
+00002250 R_CRIS_GLOB_DAT dsofn
Contents of section .*
#...
Contents of section \.rela\.got:
- 01cc 78220000 0a0b0000 00000000 .*
+ 01a4 50220000 0a090000 00000000 .*
Contents of section \.text:
- 01d8 5f1d0c00 30096f1d 0c000000 30090000 .*
- 01e8 6f0d0c00 0000611a 6f3e84df ffff0000 .*
- 01f8 0f050000 .*
+ 01b0 5f1d0c00 30096f1d 0c000000 30090000 .*
+ 01c0 6f0d0c00 0000611a 6f3e84df ffff0000 .*
+ 01d0 0f050000 .*
Contents of section \.dynamic:
- 21fc 04000000 94000000 05000000 98010000 .*
- 220c 06000000 d8000000 0a000000 33000000 .*
- 221c 0b000000 10000000 07000000 cc010000 .*
- 222c 08000000 0c000000 09000000 0c000000 .*
- 223c 00000000 00000000 00000000 00000000 .*
- 224c 00000000 00000000 00000000 00000000 .*
- 225c 00000000 00000000 00000000 00000000 .*
+ 21d4 04000000 94000000 05000000 70010000 .*
+ 21e4 06000000 d0000000 0a000000 33000000 .*
+ 21f4 0b000000 10000000 07000000 a4010000 .*
+ 2204 08000000 0c000000 09000000 0c000000 .*
+ 2214 00000000 00000000 00000000 00000000 .*
+ 2224 00000000 00000000 00000000 00000000 .*
+ 2234 00000000 00000000 00000000 00000000 .*
Contents of section \.got:
- 226c fc210000 00000000 00000000 00000000 .*
+ 2244 d4210000 00000000 00000000 00000000 .*
Index: ld/testsuite/ld-cris/hiddef1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/hiddef1.d,v
retrieving revision 1.6
diff -u -p -r1.6 hiddef1.d
--- ld/testsuite/ld-cris/hiddef1.d 5 Jun 2005 15:28:36 -0000 1.6
+++ ld/testsuite/ld-cris/hiddef1.d 7 Jul 2005 04:39:30 -0000
@@ -22,7 +22,7 @@ Relocation section '\.rela\.dyn' at offs
#...
[0-9a-f]+ 0+c R_CRIS_RELATIVE [0-9a-f]+
#...
-Symbol table '\.dynsym' contains 9 entries:
+Symbol table '\.dynsym' contains 7 entries:
#...
Symbol table '\.symtab' contains 19 entries:
#pass
Index: ld/testsuite/ld-cris/libdso-10.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/libdso-10.d,v
retrieving revision 1.7
diff -u -p -r1.7 libdso-10.d
--- ld/testsuite/ld-cris/libdso-10.d 10 Jun 2005 07:28:57 -0000 1.7
+++ ld/testsuite/ld-cris/libdso-10.d 7 Jul 2005 04:39:30 -0000
@@ -9,29 +9,29 @@
Program Header:
LOAD off 0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
- filesz 0x0+188 memsz 0x0+188 flags r-x
- LOAD off 0x0+188 vaddr 0x0+2188 paddr 0x0+2188 align 2\*\*13
+ filesz 0x0+160 memsz 0x0+160 flags r-x
+ LOAD off 0x0+160 vaddr 0x0+2160 paddr 0x0+2160 align 2\*\*13
filesz 0x0+64 memsz 0x0+64 flags rw-
- DYNAMIC off 0x0+188 vaddr 0x0+2188 paddr 0x0+2188 align 2\*\*2
+ DYNAMIC off 0x0+160 vaddr 0x0+2160 paddr 0x0+2160 align 2\*\*2
filesz 0x0+58 memsz 0x0+58 flags rw-
Dynamic Section:
HASH 0x94
- STRTAB 0x15c
- SYMTAB 0xcc
+ STRTAB 0x134
+ SYMTAB 0xc4
STRSZ 0x28
SYMENT 0x10
private flags = 2: \[v32\]
Sections:
Idx Name Size VMA LMA File off Algn
- 0 \.hash 0+38 0+94 0+94 0+94 2\*\*2
+ 0 \.hash 0+30 0+94 0+94 0+94 2\*\*2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 1 \.dynsym 0+90 0+cc 0+cc 0+cc 2\*\*2
+ 1 \.dynsym 0+70 0+c4 0+c4 0+c4 2\*\*2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 2 \.dynstr 0+28 0+15c 0+15c 0+15c 2\*\*0
+ 2 \.dynstr 0+28 0+134 0+134 0+134 2\*\*0
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 \.text 0+4 0+184 0+184 0+184 2\*\*0
+ 3 \.text 0+4 0+15c 0+15c 0+15c 2\*\*0
CONTENTS, ALLOC, LOAD, READONLY, CODE
- 4 \.dynamic 0+58 0+2188 0+2188 0+188 2\*\*2
+ 4 \.dynamic 0+58 0+2160 0+2160 0+160 2\*\*2
CONTENTS, ALLOC, LOAD, DATA
- 5 \.got 0+c 0+21e0 0+21e0 0+1e0 2\*\*2
+ 5 \.got 0+c 0+21b8 0+21b8 0+1b8 2\*\*2
CONTENTS, ALLOC, LOAD, DATA
Index: ld/testsuite/ld-cris/libdso-11.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/libdso-11.d,v
retrieving revision 1.3
diff -u -p -r1.3 libdso-11.d
--- ld/testsuite/ld-cris/libdso-11.d 23 Mar 2005 19:04:33 -0000 1.3
+++ ld/testsuite/ld-cris/libdso-11.d 7 Jul 2005 04:39:30 -0000
@@ -8,20 +8,20 @@
DYNAMIC SYMBOL TABLE:
#...
-0+1e4 g DF \.text 0+8 dsofn3
+0+1bc g DF \.text 0+8 dsofn3
#...
-0+1e0 g DF \.text 0+ dsofn
+0+1b8 g DF \.text 0+ dsofn
#...
Contents of section \.rela\.plt:
- 01a0 70220000 0b090000 00000000 .*
+ 0178 48220000 0b070000 00000000 .*
Contents of section \.plt:
- 01ac 84e20401 7e7a3f7a 04f26ffa bf09b005 .*
- 01bc 00000000 00000000 00006f0d 0c000000 .*
- 01cc 6ffabf09 b0053f7e 00000000 bf0ed4ff .*
- 01dc ffffb005 .*
+ 0184 84e20401 7e7a3f7a 04f26ffa bf09b005 .*
+ 0194 00000000 00000000 00006f0d 0c000000 .*
+ 01a4 6ffabf09 b0053f7e 00000000 bf0ed4ff .*
+ 01b4 ffffb005 .*
Contents of section \.text:
- 01e0 b0050000 bfbee2ff ffffb005 .*
+ 01b8 b0050000 bfbee2ff ffffb005 .*
Contents of section \.dynamic:
#...
Contents of section \.got:
- 2264 ec210000 00000000 00000000 d2010000 .*
+ 223c c4210000 00000000 00000000 aa010000 .*
Index: ld/testsuite/ld-cris/libdso-12.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/libdso-12.d,v
retrieving revision 1.3
diff -u -p -r1.3 libdso-12.d
--- ld/testsuite/ld-cris/libdso-12.d 23 Mar 2005 19:04:33 -0000 1.3
+++ ld/testsuite/ld-cris/libdso-12.d 7 Jul 2005 04:39:30 -0000
@@ -12,40 +12,40 @@
DYNAMIC SYMBOL TABLE:
#...
-0+282 g DF \.text 0+12 dsofn4
-0+278 g DF \.text 0+2 expfn
-0+2340 g DO \.data 0+ expobj
+0+26e g DF \.text 0+12 dsofn4
+0+264 g DF \.text 0+2 expfn
+0+232c g DO \.data 0+ expobj
#...
-0+27a g DF \.text 0+8 dsofn3
+0+266 g DF \.text 0+8 dsofn3
#...
0+ D \*UND\* 0+ dsofn
#...
Contents of section \.rela\.got:
- 0204 3c230000 0a070000 00000000 .*
+ 01f0 28230000 0a060000 00000000 .*
Contents of section \.rela\.plt:
- 0210 34230000 0b050000 00000000 38230000 .*
- 0220 0b0d0000 00000000 .*
+ 01fc 20230000 0b040000 00000000 24230000 .*
+ 020c 0b0c0000 00000000 .*
Contents of section \.plt:
- 0228 84e20401 7e7a3f7a 04f26ffa bf09b005 .*
- 0238 00000000 00000000 00006f0d 0c000000 .*
- 0248 6ffabf09 b0053f7e 00000000 bf0ed4ff .*
- 0258 ffffb005 6f0d1000 00006ffa bf09b005 .*
- 0268 3f7e0c00 0000bf0e baffffff b005 .*
+ 0214 84e20401 7e7a3f7a 04f26ffa bf09b005 .*
+ 0224 00000000 00000000 00006f0d 0c000000 .*
+ 0234 6ffabf09 b0053f7e 00000000 bf0ed4ff .*
+ 0244 ffffb005 6f0d1000 00006ffa bf09b005 .*
+ 0254 3f7e0c00 0000bf0e baffffff b005 .*
Contents of section \.text:
- 0276 b005b005 bfbee2ff ffffb005 7f0da620 .*
- 0286 00005f0d 1400bfbe b6ffffff b0050000 .*
+ 0262 b005b005 bfbee2ff ffffb005 7f0da620 .*
+ 0272 00005f0d 1400bfbe b6ffffff b0050000 .*
Contents of section \.dynamic:
- 2298 04000000 94000000 05000000 c0010000 .*
- 22a8 06000000 e0000000 0a000000 43000000 .*
- 22b8 0b000000 10000000 03000000 28230000 .*
- 22c8 02000000 18000000 14000000 07000000 .*
- 22d8 17000000 10020000 07000000 04020000 .*
- 22e8 08000000 0c000000 09000000 0c000000 .*
- 22f8 00000000 00000000 00000000 00000000 .*
- 2308 00000000 00000000 00000000 00000000 .*
- 2318 00000000 00000000 00000000 00000000 .*
+ 2284 04000000 94000000 05000000 ac010000 .*
+ 2294 06000000 dc000000 0a000000 43000000 .*
+ 22a4 0b000000 10000000 03000000 14230000 .*
+ 22b4 02000000 18000000 14000000 07000000 .*
+ 22c4 17000000 fc010000 07000000 f0010000 .*
+ 22d4 08000000 0c000000 09000000 0c000000 .*
+ 22e4 00000000 00000000 00000000 00000000 .*
+ 22f4 00000000 00000000 00000000 00000000 .*
+ 2304 00000000 00000000 00000000 00000000 .*
Contents of section \.got:
- 2328 98220000 00000000 00000000 4e020000 .*
- 2338 68020000 00000000 .*
+ 2314 84220000 00000000 00000000 3a020000 .*
+ 2324 54020000 00000000 .*
Contents of section \.data:
- 2340 00000000 .*
+ 232c 00000000 .*
Index: ld/testsuite/ld-cris/libdso-14.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/libdso-14.d,v
retrieving revision 1.3
diff -u -p -r1.3 libdso-14.d
--- ld/testsuite/ld-cris/libdso-14.d 23 Mar 2005 19:04:33 -0000 1.3
+++ ld/testsuite/ld-cris/libdso-14.d 7 Jul 2005 04:39:30 -0000
@@ -7,11 +7,11 @@
# Checking that a bsr to a non-PLT-decorated nonvisible function
# doesn't make the DSO textrel.
-Dynamic section at offset 0x1b0 contains 6 entries:
+Dynamic section at offset 0x188 contains 6 entries:
Tag[ ]+Type[ ]+Name/Value
0x0+4 \(HASH\)[ ]+0x94
- 0x0+5 \(STRTAB\)[ ]+0x170
- 0x0+6 \(SYMTAB\)[ ]+0xd0
+ 0x0+5 \(STRTAB\)[ ]+0x148
+ 0x0+6 \(SYMTAB\)[ ]+0xc8
0x0+a \(STRSZ\)[ ]+47 \(bytes\)
0x0+b \(SYMENT\)[ ]+16 \(bytes\)
0x0+ \(NULL\)[ ]+0x0
Index: ld/testsuite/ld-cris/libdso-2.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/libdso-2.d,v
retrieving revision 1.10
diff -u -p -r1.10 libdso-2.d
--- ld/testsuite/ld-cris/libdso-2.d 10 Jun 2005 07:28:57 -0000 1.10
+++ ld/testsuite/ld-cris/libdso-2.d 7 Jul 2005 04:39:31 -0000
@@ -27,16 +27,14 @@ There are 13 section headers.*
#...
Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
#...
-0000222c 0000000c R_CRIS_RELATIVE 00000184
+00002200 0000000c R_CRIS_RELATIVE 00000158
#...
-Symbol table '\.dynsym' contains 6 entries:
+Symbol table '\.dynsym' contains 4 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0+ 0 NOTYPE LOCAL DEFAULT UND
1: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 7
- 2: [0-9a-f]+ 0 NOTYPE LOCAL DEFAULT UND
- 3: [0-9a-f]+ 0 NOTYPE LOCAL DEFAULT UND
- 4: 0+ 0 OBJECT GLOBAL DEFAULT ABS TST1
- 5: 0+188 0 FUNC GLOBAL DEFAULT 7 export_1@@TST1
+ 2: 0+ 0 OBJECT GLOBAL DEFAULT ABS TST1
+ 3: 0+15c 0 FUNC GLOBAL DEFAULT 7 export_1@@TST1
Symbol table '\.symtab' contains 21 entries:
Num: Value Size Type Bind Vis Ndx Name
@@ -53,11 +51,11 @@ Symbol table '\.symtab' contains 21 entr
10: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 10
11: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 11
12: [0-9a-f]+ 0 SECTION LOCAL DEFAULT 12
- 13: 0+2198 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC
- 14: 0+2230 0 NOTYPE LOCAL DEFAULT ABS __bss_start
- 15: 0+2230 0 NOTYPE LOCAL DEFAULT ABS _edata
- 16: 0+2220 0 OBJECT LOCAL HIDDEN ABS _GLOBAL_OFFSET_TABLE_
- 17: 0+2240 0 NOTYPE LOCAL DEFAULT ABS _end
- 18: 0+184 0 FUNC LOCAL DEFAULT 7 dsofn
+ 13: 0+216c 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC
+ 14: 0+2204 0 NOTYPE LOCAL DEFAULT ABS __bss_start
+ 15: 0+2204 0 NOTYPE LOCAL DEFAULT ABS _edata
+ 16: 0+21f4 0 OBJECT LOCAL HIDDEN ABS _GLOBAL_OFFSET_TABLE_
+ 17: 0+2220 0 NOTYPE LOCAL DEFAULT ABS _end
+ 18: 0+158 0 FUNC LOCAL DEFAULT 7 dsofn
19: 0+ 0 OBJECT GLOBAL DEFAULT ABS TST1
- 20: 0+188 0 FUNC GLOBAL DEFAULT 7 export_1
+ 20: 0+15c 0 FUNC GLOBAL DEFAULT 7 export_1
Index: ld/testsuite/ld-cris/pv32-1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/pv32-1.d,v
retrieving revision 1.3
diff -u -p -r1.3 pv32-1.d
--- ld/testsuite/ld-cris/pv32-1.d 23 Mar 2005 19:04:33 -0000 1.3
+++ ld/testsuite/ld-cris/pv32-1.d 7 Jul 2005 04:39:31 -0000
@@ -10,11 +10,11 @@
DYNAMIC SYMBOL TABLE:
0+8228c g DO \*ABS\* 0+ _DYNAMIC
0+8023a DF \*UND\* 0+2 expfn
-0+82340 g DO \.bss 0+ expobj
+0+82340 g DO \.bss 0+4 expobj
0+82340 g D \*ABS\* 0+ __bss_start
0+80254 DF \*UND\* 0+8 dsofn3
0+82340 g D \*ABS\* 0+ _edata
-0+82340 g D \*ABS\* 0+ _end
+0+82360 g D \*ABS\* 0+ _end
0+80280 g DF \.text 0+8 dsofn
Contents of section \.interp:
Index: ld/testsuite/ld-cris/pv32.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/pv32.s,v
retrieving revision 1.1
diff -u -p -r1.1 pv32.s
--- ld/testsuite/ld-cris/pv32.s 4 Nov 2004 15:04:05 -0000 1.1
+++ ld/testsuite/ld-cris/pv32.s 7 Jul 2005 04:39:31 -0000
@@ -14,6 +14,8 @@ pfn:
.Lfe1:
.size pfn,.Lfe1-pfn
+ .global expobj
+ .size expobj,4
.global dsofn
.type dsofn,@function
dsofn:
Index: ld/testsuite/ld-i386/tlsnopic.dd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-i386/tlsnopic.dd,v
retrieving revision 1.2
diff -u -p -r1.2 tlsnopic.dd
--- ld/testsuite/ld-i386/tlsnopic.dd 11 May 2004 17:08:36 -0000 1.2
+++ ld/testsuite/ld-i386/tlsnopic.dd 7 Jul 2005 04:39:31 -0000
@@ -16,14 +16,14 @@ Disassembly of section .text:
1003: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax
1009: 90[ ]+nop *
100a: 90[ ]+nop *
- 100b: 03 05 88 20 00 00[ ]+add 0x2088,%eax
+ 100b: 03 05 7c 21 00 00[ ]+add 0x217c,%eax
# ->R_386_TLS_TPOFF sg1
1011: 90[ ]+nop *
1012: 90[ ]+nop *
1013: 90[ ]+nop *
1014: 90[ ]+nop *
# @indntpoff direct %gs access IE against global var
- 1015: 8b 15 8c 20 00 00[ ]+mov 0x208c,%edx
+ 1015: 8b 15 80 21 00 00[ ]+mov 0x2180,%edx
# ->R_386_TLS_TPOFF sg2
101b: 90[ ]+nop *
101c: 90[ ]+nop *
@@ -36,14 +36,14 @@ Disassembly of section .text:
1024: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax
102a: 90[ ]+nop *
102b: 90[ ]+nop *
- 102c: 03 05 90 20 00 00[ ]+add 0x2090,%eax
+ 102c: 03 05 84 21 00 00[ ]+add 0x2184,%eax
# ->R_386_TLS_TPOFF [0x14000000]
1032: 90[ ]+nop *
1033: 90[ ]+nop *
1034: 90[ ]+nop *
1035: 90[ ]+nop *
# @indntpoff direct %gs access IE against hidden var
- 1036: 8b 15 94 20 00 00[ ]+mov 0x2094,%edx
+ 1036: 8b 15 88 21 00 00[ ]+mov 0x2188,%edx
# ->R_386_TLS_TPOFF [0x18000000]
103c: 90[ ]+nop *
103d: 90[ ]+nop *
@@ -56,14 +56,14 @@ Disassembly of section .text:
1045: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax
104b: 90[ ]+nop *
104c: 90[ ]+nop *
- 104d: 03 05 80 20 00 00[ ]+add 0x2080,%eax
+ 104d: 03 05 74 21 00 00[ ]+add 0x2174,%eax
# ->R_386_TLS_TPOFF [0x00000000]
1053: 90[ ]+nop *
1054: 90[ ]+nop *
1055: 90[ ]+nop *
1056: 90[ ]+nop *
# @indntpoff direct %gs access IE against local var
- 1057: 8b 15 84 20 00 00[ ]+mov 0x2084,%edx
+ 1057: 8b 15 78 21 00 00[ ]+mov 0x2178,%edx
# ->R_386_TLS_TPOFF [0x04000000]
105d: 90[ ]+nop *
105e: 90[ ]+nop *
Index: ld/testsuite/ld-i386/tlsnopic.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-i386/tlsnopic.rd,v
retrieving revision 1.6
diff -u -p -r1.6 tlsnopic.rd
--- ld/testsuite/ld-i386/tlsnopic.rd 16 Mar 2005 21:52:46 -0000 1.6
+++ ld/testsuite/ld-i386/tlsnopic.rd 7 Jul 2005 04:39:31 -0000
@@ -16,9 +16,9 @@ Section Headers:
\[ 4\] \.rel.dyn +.*
\[ 5\] \.text +PROGBITS +0+1000 .*
\[ 6\] \.tbss +NOBITS +[0-9a-f]+ [0-9a-f]+ 000024 00 WAT 0 0 1
- \[ 7\] \.dynamic +DYNAMIC +0+2000 .*
- \[ 8\] \.got +PROGBITS +0+2080 .*
- \[ 9\] \.got.plt +PROGBITS +0+2098 .*
+ \[ 7\] \.dynamic +DYNAMIC +0+20f4 .*
+ \[ 8\] \.got +PROGBITS +0+2174 .*
+ \[ 9\] \.got.plt +PROGBITS +0+218c .*
\[10\] \.shstrtab +.*
\[11\] \.symtab +.*
\[12\] \.strtab +.*
@@ -47,36 +47,33 @@ Program Headers:
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
Offset +Info +Type +Sym.Value +Sym. Name
-0+100d 0+8 R_386_RELATIVE +
-0+1017 0+8 R_386_RELATIVE +
-0+102e 0+8 R_386_RELATIVE +
-0+1038 0+8 R_386_RELATIVE +
-0+104f 0+8 R_386_RELATIVE +
-0+1059 0+8 R_386_RELATIVE +
-0+1067 0+725 R_386_TLS_TPOFF32 0+ sg3
-0+107c 0+25 R_386_TLS_TPOFF32
-0+10a4 0+e R_386_TLS_TPOFF +
-0+10c4 0+e R_386_TLS_TPOFF +
-0+10d9 0+e R_386_TLS_TPOFF +
-0+10e4 0+e R_386_TLS_TPOFF +
-0+2080 0+e R_386_TLS_TPOFF +
-0+2084 0+e R_386_TLS_TPOFF +
-0+2090 0+e R_386_TLS_TPOFF +
-0+2094 0+e R_386_TLS_TPOFF +
-0+109b 0+80e R_386_TLS_TPOFF 0+ sg4
-0+10ce 0+a0e R_386_TLS_TPOFF 0+ sg5
-0+2088 0+b0e R_386_TLS_TPOFF 0+ sg1
-0+208c 0+d0e R_386_TLS_TPOFF 0+ sg2
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ sg3
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF 0+ sg4
+[0-9a-f ]+R_386_TLS_TPOFF 0+ sg5
+[0-9a-f ]+R_386_TLS_TPOFF 0+ sg1
+[0-9a-f ]+R_386_TLS_TPOFF 0+ sg2
-Symbol table '.dynsym' contains 16 entries:
+Symbol table '.dynsym' contains 13 entries:
+Num: +Value Size Type +Bind +Vis +Ndx Name
+[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND *
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +5 *
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +6 *
- +[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND *
- +[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND *
- +[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND *
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sg3
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sg4
@@ -111,7 +108,7 @@ Symbol table '.symtab' contains 33 entri
+[0-9]+: 0+1c +0 TLS +LOCAL HIDDEN +6 sh3
+[0-9]+: 0+20 +0 TLS +LOCAL HIDDEN +6 sh4
+[0-9]+: 0+14 +0 TLS +LOCAL HIDDEN +6 sh1
- +[0-9]+: 0+2098 +0 OBJECT LOCAL HIDDEN ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+218c +0 OBJECT LOCAL HIDDEN ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: 0+18 +0 TLS +LOCAL HIDDEN +6 sh2
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sg3
Index: ld/testsuite/ld-i386/tlsnopic.sd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-i386/tlsnopic.sd,v
retrieving revision 1.2
diff -u -p -r1.2 tlsnopic.sd
--- ld/testsuite/ld-i386/tlsnopic.sd 11 May 2004 17:08:36 -0000 1.2
+++ ld/testsuite/ld-i386/tlsnopic.sd 7 Jul 2005 04:39:31 -0000
@@ -8,5 +8,5 @@
.*: file format elf32-i386
Contents of section \.got:
- 2080 00000000 04000000 00000000 00000000 .*
- 2090 14000000 18000000 +.*
+ 2174 00000000 04000000 00000000 00000000 .*
+ 2184 14000000 18000000 +.*
Index: ld/testsuite/ld-i386/tlspic.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-i386/tlspic.rd,v
retrieving revision 1.5
diff -u -p -r1.5 tlspic.rd
--- ld/testsuite/ld-i386/tlspic.rd 16 Mar 2005 21:52:46 -0000 1.5
+++ ld/testsuite/ld-i386/tlspic.rd 7 Jul 2005 04:39:31 -0000
@@ -50,45 +50,43 @@ Program Headers:
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries:
Offset +Info +Type +Sym.Value +Sym. Name
-[0-9a-f]+ +0+23 R_386_TLS_DTPMOD3
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+23 R_386_TLS_DTPMOD3
-[0-9a-f]+ +0+23 R_386_TLS_DTPMOD3
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+23 R_386_TLS_DTPMOD3
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+80e R_386_TLS_TPOFF 0+8 sg3
-[0-9a-f]+ +0+925 R_386_TLS_TPOFF32 0+c sg4
-[0-9a-f]+ +0+90e R_386_TLS_TPOFF 0+c sg4
-[0-9a-f]+ +0+a0e R_386_TLS_TPOFF 0+10 sg5
-[0-9a-f]+ +0+b23 R_386_TLS_DTPMOD3 0+ sg1
-[0-9a-f]+ +0+b24 R_386_TLS_DTPOFF3 0+ sg1
-[0-9a-f]+ +0+e25 R_386_TLS_TPOFF32 0+4 sg2
+[0-9a-f ]+R_386_TLS_DTPMOD3
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_DTPMOD3
+[0-9a-f ]+R_386_TLS_DTPMOD3
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_DTPMOD3
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF 0+8 sg3
+[0-9a-f ]+R_386_TLS_TPOFF32 0+c sg4
+[0-9a-f ]+R_386_TLS_TPOFF 0+c sg4
+[0-9a-f ]+R_386_TLS_TPOFF 0+10 sg5
+[0-9a-f ]+R_386_TLS_DTPMOD3 0+ sg1
+[0-9a-f ]+R_386_TLS_DTPOFF3 0+ sg1
+[0-9a-f ]+R_386_TLS_TPOFF32 0+4 sg2
Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:
- Offset Info Type Sym.Value Sym. Name
-[0-9a-f]+ 0+1307 R_386_JUMP_SLOT 0+ ___tls_get_addr
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_JUMP_SLOT 0+ ___tls_get_addr
-Symbol table '.dynsym' contains 20 entries:
- +Num: + Value Size Type + Bind +Vis +Ndx Name
+Symbol table '.dynsym' contains 18 entries:
+ +Num: +Value Size Type +Bind +Vis +Ndx Name
+[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND *
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +7 *
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +8 *
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +9 *
- +[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND *
- +[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND *
+[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +8 sg8
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+[0-9]+: 0+8 +0 TLS +GLOBAL DEFAULT +8 sg3
Index: ld/testsuite/ld-powerpc/tlsexe.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsexe.r,v
retrieving revision 1.11
diff -u -p -r1.11 tlsexe.r
--- ld/testsuite/ld-powerpc/tlsexe.r 21 Mar 2005 09:39:54 -0000 1.11
+++ ld/testsuite/ld-powerpc/tlsexe.r 7 Jul 2005 04:39:32 -0000
@@ -5,7 +5,7 @@
#readelf: -WSsrl
#target: powerpc64*-*-*
-There are 16 section headers.*
+There are 17 section headers.*
Section Headers:
+\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
@@ -17,14 +17,15 @@ Section Headers:
+\[ 5\] \.rela\.dyn +.*
+\[ 6\] \.rela\.plt +.*
+\[ 7\] \.text +PROGBITS .* 0+fc 0+ +AX +0 +0 +4
- +\[ 8\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
- +\[ 9\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
- +\[10\] \.dynamic +DYNAMIC .* 0+150 10 +WA +4 +0 +8
- +\[11\] \.got +PROGBITS .* 0+30 08 +WA +0 +0 +8
- +\[12\] \.plt +.*
- +\[13\] \.shstrtab +.*
- +\[14\] \.symtab +.*
- +\[15\] \.strtab +.*
+ +\[ 8\] \.rodata + PROGBITS .* 0+ 0+ +A +0 +0 +8
+ +\[ 9\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
+ +\[10\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
+ +\[11\] \.dynamic +DYNAMIC .* 0+150 10 +WA +4 +0 +8
+ +\[12\] \.got +PROGBITS .* 0+30 08 +WA +0 +0 +8
+ +\[13\] \.plt +.*
+ +\[14\] \.shstrtab +.*
+ +\[15\] \.symtab +.*
+ +\[16\] \.strtab +.*
#...
Elf file type is EXEC \(Executable file\)
@@ -36,7 +37,7 @@ Program Headers:
+PHDR +0x0+40 0x0+10000040 0x0+10000040 0x0+150 0x0+150 R E 0x8
+INTERP +0x0+190 0x0+10000190 0x0+10000190 0x0+11 0x0+11 R +0x1
+\[Requesting program interpreter: .*\]
- +LOAD +0x0+ 0x0+10000000 0x0+10000000 0x0+464 0x0+464 R E 0x10000
+ +LOAD +0x0+ 0x0+10000000 0x0+10000000 0x0+468 0x0+468 R E 0x10000
+LOAD +0x0+468 0x0+10010468 0x0+10010468 0x0+1b8 0x0+1e8 RW +0x10000
+DYNAMIC +0x0+4a0 0x0+100104a0 0x0+100104a0 0x0+150 0x0+150 RW +0x8
+TLS +0x0+468 0x0+10010468 0x0+10010468 0x0+38 0x0+70 R +0x8
@@ -52,9 +53,9 @@ Program Headers:
Relocation section '\.rela\.dyn' at offset .* contains 3 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+10010600 +0+200000049 R_PPC64_TPREL64 +0+ gd \+ 0
-0+10010608 +0+400000044 R_PPC64_DTPMOD64 +0+ ld \+ 0
-0+10010618 +0+50000004e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
+[0-9a-f ]+R_PPC64_TPREL64 +0+ gd \+ 0
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+ ld \+ 0
+[0-9a-f ]+R_PPC64_DTPREL64 +0+50 ld2 \+ 0
Relocation section '\.rela\.plt' at offset .* contains 1 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
@@ -67,12 +68,12 @@ Symbol table '\.dynsym' contains 9 entri
.* 0+ +0 TLS +GLOBAL DEFAULT +UND gd
.* 0+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_addr
.* 0+ +0 TLS +GLOBAL DEFAULT +UND ld
-.* 0+50 +0 TLS +GLOBAL DEFAULT +9 ld2
+.* 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
.* 0+10010620 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
.* 0+10010620 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
.* 0+10010650 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
-Symbol table '\.symtab' contains 39 entries:
+Symbol table '\.symtab' contains 40 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
.* 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1
@@ -82,34 +83,35 @@ Symbol table '\.symtab' contains 39 entr
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +6
.* 0+10000368 +0 SECTION LOCAL +DEFAULT +7
-.* 0+10010468 +0 SECTION LOCAL +DEFAULT +8
-.* 0+100104a0 +0 SECTION LOCAL +DEFAULT +9
+.* 0+10000468 +0 SECTION LOCAL +DEFAULT +8
+.* 0+10010468 +0 SECTION LOCAL +DEFAULT +9
.* 0+100104a0 +0 SECTION LOCAL +DEFAULT +10
-.* 0+100105f0 +0 SECTION LOCAL +DEFAULT +11
-.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12
+.* 0+100104a0 +0 SECTION LOCAL +DEFAULT +11
+.* 0+100105f0 +0 SECTION LOCAL +DEFAULT +12
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
-.* 0+ +0 TLS +LOCAL +DEFAULT +8 gd4
-.* 0+8 +0 TLS +LOCAL +DEFAULT +8 ld4
-.* 0+10 +0 TLS +LOCAL +DEFAULT +8 ld5
-.* 0+18 +0 TLS +LOCAL +DEFAULT +8 ld6
-.* 0+20 +0 TLS +LOCAL +DEFAULT +8 ie4
-.* 0+28 +0 TLS +LOCAL +DEFAULT +8 le4
-.* 0+30 +0 TLS +LOCAL +DEFAULT +8 le5
+.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +16
+.* 0+ +0 TLS +LOCAL +DEFAULT +9 gd4
+.* 0+8 +0 TLS +LOCAL +DEFAULT +9 ld4
+.* 0+10 +0 TLS +LOCAL +DEFAULT +9 ld5
+.* 0+18 +0 TLS +LOCAL +DEFAULT +9 ld6
+.* 0+20 +0 TLS +LOCAL +DEFAULT +9 ie4
+.* 0+28 +0 TLS +LOCAL +DEFAULT +9 le4
+.* 0+30 +0 TLS +LOCAL +DEFAULT +9 le5
.* 0+ +0 FUNC +LOCAL +DEFAULT +UND \.__tls_get_addr
.* 0+100104a0 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
.* 0+ +0 TLS +GLOBAL DEFAULT +UND gd
-.* 0+60 +0 TLS +GLOBAL DEFAULT +9 le0
+.* 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
.* 0+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_addr
-.* 0+40 +0 TLS +GLOBAL DEFAULT +9 ld0
-.* 0+68 +0 TLS +GLOBAL DEFAULT +9 le1
+.* 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
+.* 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
.* 0+ +0 TLS +GLOBAL DEFAULT +UND ld
.* [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +7 _start
-.* 0+50 +0 TLS +GLOBAL DEFAULT +9 ld2
-.* 0+48 +0 TLS +GLOBAL DEFAULT +9 ld1
+.* 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
+.* 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
.* [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
.* [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
.* [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
-.* 0+38 +0 TLS +GLOBAL DEFAULT +9 gd0
-.* 0+58 +0 TLS +GLOBAL DEFAULT +9 ie0
+.* 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
+.* 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
Index: ld/testsuite/ld-powerpc/tlsexetoc.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsexetoc.r,v
retrieving revision 1.11
diff -u -p -r1.11 tlsexetoc.r
--- ld/testsuite/ld-powerpc/tlsexetoc.r 21 Mar 2005 09:39:54 -0000 1.11
+++ ld/testsuite/ld-powerpc/tlsexetoc.r 7 Jul 2005 04:39:32 -0000
@@ -5,7 +5,7 @@
#readelf: -WSsrl
#target: powerpc64*-*-*
-There are 16 section headers.*
+There are 17 section headers.*
Section Headers:
+\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
@@ -17,14 +17,15 @@ Section Headers:
+\[ 5\] \.rela\.dyn +.*
+\[ 6\] \.rela\.plt +.*
+\[ 7\] \.text +PROGBITS .* 0+bc 0+ +AX +0 +0 +4
- +\[ 8\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
- +\[ 9\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
- +\[10\] \.dynamic +DYNAMIC .* 0+150 10 +WA +4 +0 +8
- +\[11\] \.got +PROGBITS .* 0+58 08 +WA +0 +0 +8
- +\[12\] \.plt +.*
- +\[13\] \.shstrtab +.*
- +\[14\] \.symtab +.*
- +\[15\] \.strtab +.*
+ +\[ 8\] \.rodata +PROGBITS .* 0+ 0+ +A +0 +0 +8
+ +\[ 9\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
+ +\[10\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
+ +\[11\] \.dynamic +DYNAMIC .* 0+150 10 +WA +4 +0 +8
+ +\[12\] \.got +PROGBITS .* 0+58 08 +WA +0 +0 +8
+ +\[13\] \.plt +.*
+ +\[14\] \.shstrtab +.*
+ +\[15\] \.symtab +.*
+ +\[16\] \.strtab +.*
#...
Elf file type is EXEC \(Executable file\)
@@ -36,7 +37,7 @@ Program Headers:
+PHDR +0x0+40 0x0+10000040 0x0+10000040 0x0+150 0x0+150 R E 0x8
+INTERP +0x0+190 0x0+10000190 0x0+10000190 0x0+11 0x0+11 R +0x1
+\[Requesting program interpreter: .*\]
- +LOAD +0x0+ 0x0+10000000 0x0+10000000 0x0+3f4 0x0+3f4 R E 0x10000
+ +LOAD +0x0+ 0x0+10000000 0x0+10000000 0x0+3f8 0x0+3f8 R E 0x10000
+LOAD +0x0+3f8 0x0+100103f8 0x0+100103f8 0x0+1e0 0x0+210 RW +0x10000
+DYNAMIC +0x0+430 0x0+10010430 0x0+10010430 0x0+150 0x0+150 RW +0x8
+TLS +0x0+3f8 0x0+100103f8 0x0+100103f8 0x0+38 0x0+70 R +0x8
@@ -70,7 +71,7 @@ Symbol table '\.dynsym' contains 8 entri
.* [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
.* [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
-Symbol table '\.symtab' contains 40 entries:
+Symbol table '\.symtab' contains 41 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
.* 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1
@@ -80,35 +81,36 @@ Symbol table '\.symtab' contains 40 entr
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +6
.* 0+10000338 +0 SECTION LOCAL +DEFAULT +7
-.* 0+100103f8 +0 SECTION LOCAL +DEFAULT +8
-.* 0+10010430 +0 SECTION LOCAL +DEFAULT +9
+.* 0+100003f8 +0 SECTION LOCAL +DEFAULT +8
+.* 0+100103f8 +0 SECTION LOCAL +DEFAULT +9
.* 0+10010430 +0 SECTION LOCAL +DEFAULT +10
-.* 0+10010580 +0 SECTION LOCAL +DEFAULT +11
-.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12
+.* 0+10010430 +0 SECTION LOCAL +DEFAULT +11
+.* 0+10010580 +0 SECTION LOCAL +DEFAULT +12
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14
.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
-.* 0+ +0 TLS +LOCAL +DEFAULT +8 gd4
-.* 0+8 +0 TLS +LOCAL +DEFAULT +8 ld4
-.* 0+10 +0 TLS +LOCAL +DEFAULT +8 ld5
-.* 0+18 +0 TLS +LOCAL +DEFAULT +8 ld6
-.* 0+20 +0 TLS +LOCAL +DEFAULT +8 ie4
-.* 0+28 +0 TLS +LOCAL +DEFAULT +8 le4
-.* 0+30 +0 TLS +LOCAL +DEFAULT +8 le5
-.* 0+100105d0 +0 NOTYPE +LOCAL +DEFAULT +11 \.Lie0
+.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +16
+.* 0+ +0 TLS +LOCAL +DEFAULT +9 gd4
+.* 0+8 +0 TLS +LOCAL +DEFAULT +9 ld4
+.* 0+10 +0 TLS +LOCAL +DEFAULT +9 ld5
+.* 0+18 +0 TLS +LOCAL +DEFAULT +9 ld6
+.* 0+20 +0 TLS +LOCAL +DEFAULT +9 ie4
+.* 0+28 +0 TLS +LOCAL +DEFAULT +9 le4
+.* 0+30 +0 TLS +LOCAL +DEFAULT +9 le5
+.* 0+100105d0 +0 NOTYPE +LOCAL +DEFAULT +12 \.Lie0
.* 0+ +0 FUNC +LOCAL +DEFAULT +UND \.__tls_get_addr
.* 0+10010430 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
.* 0+ +0 TLS +GLOBAL DEFAULT +UND gd
-.* 0+60 +0 TLS +GLOBAL DEFAULT +9 le0
+.* 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
.* 0+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_addr
-.* 0+40 +0 TLS +GLOBAL DEFAULT +9 ld0
-.* 0+68 +0 TLS +GLOBAL DEFAULT +9 le1
+.* 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
+.* 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
.* 0+ +0 TLS +GLOBAL DEFAULT +UND ld
.* 0+10000354 +0 NOTYPE +GLOBAL DEFAULT +7 _start
-.* 0+50 +0 TLS +GLOBAL DEFAULT +9 ld2
-.* 0+48 +0 TLS +GLOBAL DEFAULT +9 ld1
+.* 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
+.* 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
.* 0+100105d8 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
.* 0+100105d8 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
.* 0+10010608 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
-.* 0+38 +0 TLS +GLOBAL DEFAULT +9 gd0
-.* 0+58 +0 TLS +GLOBAL DEFAULT +9 ie0
+.* 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
+.* 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
Index: ld/testsuite/ld-powerpc/tlsso.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsso.g,v
retrieving revision 1.3
diff -u -p -r1.3 tlsso.g
--- ld/testsuite/ld-powerpc/tlsso.g 11 May 2004 17:08:36 -0000 1.3
+++ ld/testsuite/ld-powerpc/tlsso.g 7 Jul 2005 04:39:32 -0000
@@ -7,9 +7,9 @@
.*: +file format elf64-powerpc
Contents of section \.got:
- 10850 00000000 00018850 00000000 00000000 .*
- 10860 00000000 00000000 00000000 00000000 .*
- 10870 00000000 00000000 00000000 00000000 .*
- 10880 00000000 00000000 00000000 00000000 .*
- 10890 00000000 00000000 00000000 00000000 .*
- 108a0 00000000 00000000 00000000 00000000 .*
+ 10818 00000000 00018818 00000000 00000000 .*
+ 10828 00000000 00000000 00000000 00000000 .*
+ 10838 00000000 00000000 00000000 00000000 .*
+ 10848 00000000 00000000 00000000 00000000 .*
+ 10858 00000000 00000000 00000000 00000000 .*
+ 10868 00000000 00000000 00000000 00000000 .*
Index: ld/testsuite/ld-powerpc/tlsso.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsso.r,v
retrieving revision 1.11
diff -u -p -r1.11 tlsso.r
--- ld/testsuite/ld-powerpc/tlsso.r 21 Mar 2005 09:39:54 -0000 1.11
+++ ld/testsuite/ld-powerpc/tlsso.r 7 Jul 2005 04:39:32 -0000
@@ -4,7 +4,7 @@
#readelf: -WSsrl
#target: powerpc64*-*-*
-There are 15 section headers.*
+There are 16 section headers.*
Section Headers:
+\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
@@ -14,15 +14,16 @@ Section Headers:
+\[ 3\] \.dynstr +.*
+\[ 4\] \.rela\.dyn +.*
+\[ 5\] \.rela\.plt +.*
- +\[ 6\] \.text +PROGBITS +0+5c8 0+5c8 0+fc 0+ +AX +0 +0 +4
- +\[ 7\] \.tdata +PROGBITS +0+106c8 0+6c8 0+38 0+ WAT +0 +0 +8
- +\[ 8\] \.tbss +NOBITS +0+10700 0+700 0+38 0+ WAT +0 +0 +8
- +\[ 9\] \.dynamic +DYNAMIC +0+10700 0+700 0+150 10 +WA +3 +0 +8
- +\[10\] \.got +PROGBITS +0+10850 0+850 0+60 08 +WA +0 +0 +8
- +\[11\] \.plt +.*
- +\[12\] \.shstrtab +.*
- +\[13\] \.symtab +.*
- +\[14\] \.strtab +.*
+ +\[ 6\] \.text +PROGBITS +0+590 0+590 0+fc 0+ +AX +0 +0 +4
+ +\[ 7\] \.tdata +PROGBITS +0+10690 0+690 0+38 0+ WAT +0 +0 +8
+ +\[ 8\] \.tbss +NOBITS +0+106c8 0+6c8 0+38 0+ WAT +0 +0 +8
+ +\[ 9\] \.data\.rel\.ro +PROGBITS .*
+ +\[10\] \.dynamic +DYNAMIC +0+106c8 0+6c8 0+150 10 +WA +3 +0 +8
+ +\[11\] \.got +PROGBITS +0+10818 0+818 0+60 08 +WA +0 +0 +8
+ +\[12\] \.plt +.*
+ +\[13\] \.shstrtab +.*
+ +\[14\] \.symtab +.*
+ +\[15\] \.strtab +.*
#...
Elf file type is DYN \(Shared object file\)
@@ -31,10 +32,10 @@ There are 4 program headers.*
Program Headers:
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
- +LOAD +0x0+ 0x0+ 0x0+ 0x0+6c4 0x0+6c4 R E 0x10000
- +LOAD +0x0+6c8 0x0+106c8 0x0+106c8 0x0+1e8 0x0+218 RW +0x10000
- +DYNAMIC +0x0+700 0x0+10700 0x0+10700 0x0+150 0x0+150 RW +0x8
- +TLS +0x0+6c8 0x0+106c8 0x0+106c8 0x0+38 0x0+70 R +0x8
+ +LOAD +0x0+ 0x0+ 0x0+ 0x0+68c 0x0+68c R E 0x10000
+ +LOAD +0x0+690 0x0+10690 0x0+10690 0x0+1e8 0x0+218 RW +0x10000
+ +DYNAMIC +0x0+6c8 0x0+106c8 0x0+106c8 0x0+150 0x0+150 RW +0x8
+ +TLS +0x0+690 0x0+10690 0x0+10690 0x0+38 0x0+70 R +0x8
Section to Segment mapping:
+Segment Sections\.\.\.
@@ -45,37 +46,35 @@ Program Headers:
Relocation section '\.rela\.dyn' at offset .* contains 16 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+632 +0+90+45 R_PPC64_TPREL16 +0+60 le0 \+ 0
-0+636 +0+c0+48 R_PPC64_TPREL16_HA +0+68 le1 \+ 0
-0+63a +0+c0+46 R_PPC64_TPREL16_LO +0+68 le1 \+ 0
-0+672 +0+20+5f R_PPC64_TPREL16_DS +0+106c8 \.tdata \+ 28
-0+676 +0+20+48 R_PPC64_TPREL16_HA +0+106c8 \.tdata \+ 30
-0+67a +0+20+46 R_PPC64_TPREL16_LO +0+106c8 \.tdata \+ 30
-0+10858 +0+44 R_PPC64_DTPMOD64 +0+
-0+10868 +0+44 R_PPC64_DTPMOD64 +0+
-0+10870 +0+4e R_PPC64_DTPREL64 +0+
-0+10878 +0+4e R_PPC64_DTPREL64 +0+18
-0+10880 +0+80+44 R_PPC64_DTPMOD64 +0+ gd \+ 0
-0+10888 +0+80+4e R_PPC64_DTPREL64 +0+ gd \+ 0
-0+10890 +0+f0+4e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
-0+10898 +0+140+44 R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
-0+108a0 +0+140+4e R_PPC64_DTPREL64 +0+38 gd0 \+ 0
-0+108a8 +0+150+49 R_PPC64_TPREL64 +0+58 ie0 \+ 0
+[0-9a-f ]+R_PPC64_TPREL16 +0+60 le0 \+ 0
+[0-9a-f ]+R_PPC64_TPREL16_HA +0+68 le1 \+ 0
+[0-9a-f ]+R_PPC64_TPREL16_LO +0+68 le1 \+ 0
+[0-9a-f ]+R_PPC64_TPREL16_DS +0+10690 \.tdata \+ 28
+[0-9a-f ]+R_PPC64_TPREL16_HA +0+10690 \.tdata \+ 30
+[0-9a-f ]+R_PPC64_TPREL16_LO +0+10690 \.tdata \+ 30
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+
+[0-9a-f ]+R_PPC64_DTPREL64 +0+
+[0-9a-f ]+R_PPC64_DTPREL64 +0+18
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+ gd \+ 0
+[0-9a-f ]+R_PPC64_DTPREL64 +0+ gd \+ 0
+[0-9a-f ]+R_PPC64_DTPREL64 +0+50 ld2 \+ 0
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
+[0-9a-f ]+R_PPC64_DTPREL64 +0+38 gd0 \+ 0
+[0-9a-f ]+R_PPC64_TPREL64 +0+58 ie0 \+ 0
Relocation section '\.rela\.plt' at offset .* contains 1 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+108c8 +0+a0+15 R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0
+[0-9a-f ]+R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0
-Symbol table '\.dynsym' contains 22 entries:
+Symbol table '\.dynsym' contains 20 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+5c8 +0 SECTION LOCAL +DEFAULT +6
- +[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +7
- +[0-9]+: 0+10700 +0 SECTION LOCAL +DEFAULT +8
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+10700 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+590 +0 SECTION LOCAL +DEFAULT +6
+ +[0-9]+: 0+10690 +0 SECTION LOCAL +DEFAULT +7
+ +[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +8
+ +[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +9
+ +[0-9]+: 0+106c8 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
@@ -91,7 +90,7 @@ Symbol table '\.dynsym' contains 22 entr
+[0-9]+: 0+38 +0 TLS +GLOBAL DEFAULT +8 gd0
+[0-9]+: 0+58 +0 TLS +GLOBAL DEFAULT +8 ie0
-Symbol table '\.symtab' contains 38 entries:
+Symbol table '\.symtab' contains 39 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1
@@ -99,15 +98,16 @@ Symbol table '\.symtab' contains 38 entr
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
- +[0-9]+: 0+5c8 +0 SECTION LOCAL +DEFAULT +6
- +[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +7
- +[0-9]+: 0+10700 +0 SECTION LOCAL +DEFAULT +8
- +[0-9]+: 0+10700 +0 SECTION LOCAL +DEFAULT +9
- +[0-9]+: 0+10850 +0 SECTION LOCAL +DEFAULT +10
+ +[0-9]+: 0+590 +0 SECTION LOCAL +DEFAULT +6
+ +[0-9]+: 0+10690 +0 SECTION LOCAL +DEFAULT +7
+ +[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +8
+ +[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +9
+ +[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
+[0-9]+: 0+ +0 TLS +LOCAL +DEFAULT +7 gd4
+[0-9]+: 0+8 +0 TLS +LOCAL +DEFAULT +7 ld4
+[0-9]+: 0+10 +0 TLS +LOCAL +DEFAULT +7 ld5
@@ -116,7 +116,7 @@ Symbol table '\.symtab' contains 38 entr
+[0-9]+: 0+28 +0 TLS +LOCAL +DEFAULT +7 le4
+[0-9]+: 0+30 +0 TLS +LOCAL +DEFAULT +7 le5
+[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr
- +[0-9]+: 0+10700 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+106c8 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
Index: ld/testsuite/ld-powerpc/tlsso32.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsso32.d,v
retrieving revision 1.10
diff -u -p -r1.10 tlsso32.d
--- ld/testsuite/ld-powerpc/tlsso32.d 7 May 2005 02:55:55 -0000 1.10
+++ ld/testsuite/ld-powerpc/tlsso32.d 7 Jul 2005 04:39:32 -0000
@@ -42,5 +42,5 @@ Disassembly of section \.got:
.* <\.got>:
\.\.\.
.*: 4e 80 00 21 blrl
-.*: 00 01 04 90 .*
+.*: 00 01 04 54 .*
\.\.\.
Index: ld/testsuite/ld-powerpc/tlsso32.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsso32.g,v
retrieving revision 1.6
diff -u -p -r1.6 tlsso32.g
--- ld/testsuite/ld-powerpc/tlsso32.g 7 May 2005 02:55:55 -0000 1.6
+++ ld/testsuite/ld-powerpc/tlsso32.g 7 Jul 2005 04:39:32 -0000
@@ -9,5 +9,5 @@
Contents of section \.got:
.* 00000000 00000000 00000000 00000000 .*
.* 00000000 00000000 00000000 00000000 .*
-.* 00000000 4e800021 00010490 00000000 .*
+.* 00000000 4e800021 00010454 00000000 .*
.* 00000000 .*
Index: ld/testsuite/ld-powerpc/tlsso32.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsso32.r,v
retrieving revision 1.11
diff -u -p -r1.11 tlsso32.r
--- ld/testsuite/ld-powerpc/tlsso32.r 7 May 2005 02:55:55 -0000 1.11
+++ ld/testsuite/ld-powerpc/tlsso32.r 7 Jul 2005 04:39:32 -0000
@@ -14,11 +14,11 @@ Section Headers:
+\[ 3\] \.dynstr +.*
+\[ 4\] \.rela\.dyn +.*
+\[ 5\] \.rela\.plt +.*
- +\[ 6\] \.text +PROGBITS +0+404 0+404 0+70 0+ +AX +0 +0 +1
- +\[ 7\] \.tdata +PROGBITS +0+10474 0+474 0+1c 0+ WAT +0 +0 +4
- +\[ 8\] \.tbss +NOBITS +0+10490 0+490 0+1c 0+ WAT +0 +0 +4
- +\[ 9\] \.dynamic +DYNAMIC +0+10490 0+490 0+a0 08 +WA +3 +0 +4
- +\[10\] \.got +PROGBITS +0+10530 0+530 0+34 04 WAX +0 +0 +4
+ +\[ 6\] \.text +PROGBITS +0+3c8 0+3c8 0+70 0+ +AX +0 +0 +1
+ +\[ 7\] \.tdata +PROGBITS +0+10438 0+438 0+1c 0+ WAT +0 +0 +4
+ +\[ 8\] \.tbss +NOBITS +0+10454 0+454 0+1c 0+ WAT +0 +0 +4
+ +\[ 9\] \.dynamic +DYNAMIC +0+10454 0+454 0+a0 08 +WA +3 +0 +4
+ +\[10\] \.got +PROGBITS +0+104f4 0+4f4 0+34 04 WAX +0 +0 +4
+\[11\] \.plt +.*
+\[12\] \.shstrtab +.*
+\[13\] \.symtab +.*
@@ -31,10 +31,10 @@ There are 4 program headers.*
Program Headers:
+Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
- +LOAD +0x0+ 0x0+ 0x0+ 0x0+474 0x0+474 R E 0x10000
- +LOAD +0x0+474 0x0+10474 0x0+10474 0x0+f0 0x0+144 RWE 0x10000
- +DYNAMIC +0x0+490 0x0+10490 0x0+10490 0x0+a0 0x0+a0 RW +0x4
- +TLS +0x0+474 0x0+10474 0x0+10474 0x0+1c 0x0+38 R +0x4
+ +LOAD +0x0+ 0x0+ 0x0+ 0x0+438 0x0+438 R E 0x10000
+ +LOAD +0x0+438 0x0+10438 0x0+10438 0x0+f0 0x0+144 RWE 0x10000
+ +DYNAMIC +0x0+454 0x0+10454 0x0+10454 0x0+a0 0x0+a0 RW +0x4
+ +TLS +0x0+438 0x0+10438 0x0+10438 0x0+1c 0x0+38 R +0x4
Section to Segment mapping:
+Segment Sections\.\.\.
@@ -45,39 +45,36 @@ Program Headers:
Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
-0+408 +0+a0a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
-0+410 +0+a0a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
-0+448 +0+a0a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
-0+450 +0+a0a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
-0+43a +0+945 R_PPC_TPREL16 +0+30 +le0 \+ 0
-0+43e +0+c48 R_PPC_TPREL16_HA +0+34 +le1 \+ 0
-0+442 +0+c46 R_PPC_TPREL16_LO +0+34 +le1 \+ 0
-0+46a +0+245 R_PPC_TPREL16 +0+10474 +\.tdata \+ 10488
-0+46e +0+248 R_PPC_TPREL16_HA +0+10474 +\.tdata \+ 1048c
-0+472 +0+246 R_PPC_TPREL16_LO +0+10474 +\.tdata \+ 1048c
-0+10530 +0+44 R_PPC_DTPMOD32 +0+
-0+10534 +0+4e R_PPC_DTPREL32 +0+
-0+10538 +0+44 R_PPC_DTPMOD32 +0+
-0+10540 +0+844 R_PPC_DTPMOD32 +0+ +gd \+ 0
-0+10544 +0+84e R_PPC_DTPREL32 +0+ +gd \+ 0
-0+10548 +0+1544 R_PPC_DTPMOD32 +0+1c +gd0 \+ 0
-0+1054c +0+154e R_PPC_DTPREL32 +0+1c +gd0 \+ 0
-0+10550 +0+1649 R_PPC_TPREL32 +0+2c +ie0 \+ 0
+[0-9a-f ]+R_PPC_REL24 +0+ +__tls_get_addr \+ 0
+[0-9a-f ]+R_PPC_REL24 +0+ +__tls_get_addr \+ 0
+[0-9a-f ]+R_PPC_REL24 +0+ +__tls_get_addr \+ 0
+[0-9a-f ]+R_PPC_REL24 +0+ +__tls_get_addr \+ 0
+[0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0
+[0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0
+[0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0
+[0-9a-f ]+R_PPC_TPREL16 +0+10438 +\.tdata \+ 1044c
+[0-9a-f ]+R_PPC_TPREL16_HA +0+10438 +\.tdata \+ 10450
+[0-9a-f ]+R_PPC_TPREL16_LO +0+10438 +\.tdata \+ 10450
+[0-9a-f ]+R_PPC_DTPMOD32 +0+
+[0-9a-f ]+R_PPC_DTPREL32 +0+
+[0-9a-f ]+R_PPC_DTPMOD32 +0+
+[0-9a-f ]+R_PPC_DTPMOD32 +0+ +gd \+ 0
+[0-9a-f ]+R_PPC_DTPREL32 +0+ +gd \+ 0
+[0-9a-f ]+R_PPC_DTPMOD32 +0+1c +gd0 \+ 0
+[0-9a-f ]+R_PPC_DTPREL32 +0+1c +gd0 \+ 0
+[0-9a-f ]+R_PPC_TPREL32 +0+2c +ie0 \+ 0
Relocation section '\.rela\.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
-0+105ac +0+a15 R_PPC_JMP_SLOT +0+ +__tls_get_addr \+ 0
+[0-9a-f ]+R_PPC_JMP_SLOT +0+ +__tls_get_addr \+ 0
-Symbol table '\.dynsym' contains 23 entries:
+Symbol table '\.dynsym' contains 20 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+404 +0 SECTION LOCAL +DEFAULT +6
- +[0-9]+: 0+10474 +0 SECTION LOCAL +DEFAULT +7
- +[0-9]+: 0+10490 +0 SECTION LOCAL +DEFAULT +8
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+10490 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+3c8 +0 SECTION LOCAL +DEFAULT +6
+ +[0-9]+: 0+10438 +0 SECTION LOCAL +DEFAULT +7
+ +[0-9]+: 0+10454 +0 SECTION LOCAL +DEFAULT +8
+ +[0-9]+: 0+10454 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+30 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
@@ -102,11 +99,11 @@ Symbol table '\.symtab' contains 39 entr
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
- +[0-9]+: 0+404 +0 SECTION LOCAL +DEFAULT +6
- +[0-9]+: 0+10474 +0 SECTION LOCAL +DEFAULT +7
- +[0-9]+: 0+10490 +0 SECTION LOCAL +DEFAULT +8
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +6
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +7
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +9
- +[0-9]+: 0+10530 +0 SECTION LOCAL +DEFAULT +10
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +12
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +13
@@ -118,8 +115,8 @@ Symbol table '\.symtab' contains 39 entr
+[0-9]+: 0+10 +0 TLS +LOCAL +DEFAULT +7 ie4
+[0-9]+: 0+14 +0 TLS +LOCAL +DEFAULT +7 le4
+[0-9]+: 0+18 +0 TLS +LOCAL +DEFAULT +7 le5
- +[0-9]+: 0+10558 +0 OBJECT +LOCAL +HIDDEN +ABS _GLOBAL_OFFSET_TABLE_
- +[0-9]+: 0+10490 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+1051c +0 OBJECT +LOCAL +HIDDEN +ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+10454 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+30 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
Index: ld/testsuite/ld-powerpc/tlstocso.g
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstocso.g,v
retrieving revision 1.4
diff -u -p -r1.4 tlstocso.g
--- ld/testsuite/ld-powerpc/tlstocso.g 11 May 2004 17:08:36 -0000 1.4
+++ ld/testsuite/ld-powerpc/tlstocso.g 7 Jul 2005 04:39:32 -0000
@@ -7,9 +7,9 @@
.*: +file format elf64-powerpc
Contents of section \.got:
- 10798 00000000 00018798 00000000 00000000 .*
- 107a8 00000000 00000000 00000000 00000000 .*
- 107b8 00000000 00000000 00000000 00000000 .*
- 107c8 00000000 00000000 00000000 00000000 .*
- 107d8 00000000 00000000 00000000 00000000 .*
- 107e8 00000000 00000000 .*
+ 10760 00000000 00018760 00000000 00000000 .*
+ 10770 00000000 00000000 00000000 00000000 .*
+ 10780 00000000 00000000 00000000 00000000 .*
+ 10790 00000000 00000000 00000000 00000000 .*
+ 107a0 00000000 00000000 00000000 00000000 .*
+ 107b0 00000000 00000000 .*
Index: ld/testsuite/ld-powerpc/tlstocso.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlstocso.r,v
retrieving revision 1.12
diff -u -p -r1.12 tlstocso.r
--- ld/testsuite/ld-powerpc/tlstocso.r 21 Mar 2005 09:39:54 -0000 1.12
+++ ld/testsuite/ld-powerpc/tlstocso.r 7 Jul 2005 04:39:32 -0000
@@ -4,7 +4,7 @@
#readelf: -WSsrl
#target: powerpc64*-*-*
-There are 15 section headers.*
+There are 16 section headers.*
Section Headers:
+\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
@@ -14,15 +14,16 @@ Section Headers:
+\[ 3\] \.dynstr +.*
+\[ 4\] \.rela\.dyn +.*
+\[ 5\] \.rela\.plt +.*
- +\[ 6\] \.text +PROGBITS +0+550 0+550 0+bc 0+ +AX +0 +0 +4
- +\[ 7\] \.tdata +PROGBITS +0+10610 0+610 0+38 0+ WAT +0 +0 +8
- +\[ 8\] \.tbss +NOBITS +0+10648 0+648 0+38 0+ WAT +0 +0 +8
- +\[ 9\] \.dynamic +DYNAMIC +0+10648 0+648 0+150 10 +WA +3 +0 +8
- +\[10\] \.got +PROGBITS +0+10798 0+798 0+58 08 +WA +0 +0 +8
- +\[11\] \.plt +.*
- +\[12\] \.shstrtab +.*
- +\[13\] \.symtab +.*
- +\[14\] \.strtab +.*
+ +\[ 6\] \.text +PROGBITS +0+518 0+518 0+bc 0+ +AX +0 +0 +4
+ +\[ 7\] \.tdata +PROGBITS +0+105d8 0+5d8 0+38 0+ WAT +0 +0 +8
+ +\[ 8\] \.tbss +NOBITS +0+10610 0+610 0+38 0+ WAT +0 +0 +8
+ +\[ 9\] \.data\.rel\.ro +PROGBITS .*
+ +\[10\] \.dynamic +DYNAMIC +0+10610 0+610 0+150 10 +WA +3 +0 +8
+ +\[11\] \.got +PROGBITS +0+10760 0+760 0+58 08 +WA +0 +0 +8
+ +\[12\] \.plt +.*
+ +\[13\] \.shstrtab +.*
+ +\[14\] \.symtab +.*
+ +\[15\] \.strtab +.*
#...
Elf file type is DYN \(Shared object file\)
@@ -31,10 +32,10 @@ There are 4 program headers.*
Program Headers:
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
- +LOAD +0x0+ 0x0+ 0x0+ 0x0+60c 0x0+60c R E 0x10000
- +LOAD +0x0+610 0x0+10610 0x0+10610 0x0+1e0 0x0+210 RW +0x10000
- +DYNAMIC +0x0+648 0x0+10648 0x0+10648 0x0+150 0x0+150 RW +0x8
- +TLS +0x0+610 0x0+10610 0x0+10610 0x0+38 0x0+70 R +0x8
+ +LOAD +0x0+ 0x0+ 0x0+ 0x0+5d4 0x0+5d4 R E 0x10000
+ +LOAD +0x0+5d8 0x0+105d8 0x0+105d8 0x0+1e0 0x0+210 RW +0x10000
+ +DYNAMIC +0x0+610 0x0+10610 0x0+10610 0x0+150 0x0+150 RW +0x8
+ +TLS +0x0+5d8 0x0+105d8 0x0+105d8 0x0+38 0x0+70 R +0x8
Section to Segment mapping:
+Segment Sections\.\.\.
@@ -45,32 +46,30 @@ Program Headers:
Relocation section '\.rela\.dyn' at offset .* contains 11 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+5ba +0+90+45 R_PPC64_TPREL16 +0+60 le0 \+ 0
-0+5be +0+c0+48 R_PPC64_TPREL16_HA +0+68 le1 \+ 0
-0+5c2 +0+c0+46 R_PPC64_TPREL16_LO +0+68 le1 \+ 0
-0+107a0 +0+80+44 R_PPC64_DTPMOD64 +0+ gd \+ 0
-0+107a8 +0+80+4e R_PPC64_DTPREL64 +0+ gd \+ 0
-0+107b0 +0+d0+44 R_PPC64_DTPMOD64 +0+ ld \+ 0
-0+107c0 +0+140+44 R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
-0+107c8 +0+140+4e R_PPC64_DTPREL64 +0+38 gd0 \+ 0
-0+107d0 +0+b0+44 R_PPC64_DTPMOD64 +0+40 ld0 \+ 0
-0+107e0 +0+f0+4e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
-0+107e8 +0+150+49 R_PPC64_TPREL64 +0+58 ie0 \+ 0
+[0-9a-f ]+R_PPC64_TPREL16 +0+60 le0 \+ 0
+[0-9a-f ]+R_PPC64_TPREL16_HA +0+68 le1 \+ 0
+[0-9a-f ]+R_PPC64_TPREL16_LO +0+68 le1 \+ 0
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+ gd \+ 0
+[0-9a-f ]+R_PPC64_DTPREL64 +0+ gd \+ 0
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+ ld \+ 0
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
+[0-9a-f ]+R_PPC64_DTPREL64 +0+38 gd0 \+ 0
+[0-9a-f ]+R_PPC64_DTPMOD64 +0+40 ld0 \+ 0
+[0-9a-f ]+R_PPC64_DTPREL64 +0+50 ld2 \+ 0
+[0-9a-f ]+R_PPC64_TPREL64 +0+58 ie0 \+ 0
Relocation section '\.rela\.plt' at offset .* contains 1 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+10808 +0+a0+15 R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0
+[0-9a-f ]+R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0
-Symbol table '\.dynsym' contains 22 entries:
+Symbol table '\.dynsym' contains 20 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+550 +0 SECTION LOCAL +DEFAULT +6
- +[0-9]+: 0+10610 +0 SECTION LOCAL +DEFAULT +7
- +[0-9]+: 0+10648 +0 SECTION LOCAL +DEFAULT +8
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
- +[0-9]+: 0+10648 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+518 +0 SECTION LOCAL +DEFAULT +6
+ +[0-9]+: 0+105d8 +0 SECTION LOCAL +DEFAULT +7
+ +[0-9]+: 0+10610 +0 SECTION LOCAL +DEFAULT +8
+ +[0-9]+: 0+10610 +0 SECTION LOCAL +DEFAULT +9
+ +[0-9]+: 0+10610 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
@@ -86,7 +85,7 @@ Symbol table '\.dynsym' contains 22 entr
+[0-9]+: 0+38 +0 TLS +GLOBAL DEFAULT +8 gd0
+[0-9]+: 0+58 +0 TLS +GLOBAL DEFAULT +8 ie0
-Symbol table '\.symtab' contains 39 entries:
+Symbol table '\.symtab' contains 40 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: 0+120 +0 SECTION LOCAL +DEFAULT +1
@@ -94,15 +93,16 @@ Symbol table '\.symtab' contains 39 entr
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
- +[0-9]+: 0+550 +0 SECTION LOCAL +DEFAULT +6
- +[0-9]+: 0+10610 +0 SECTION LOCAL +DEFAULT +7
- +[0-9]+: 0+10648 +0 SECTION LOCAL +DEFAULT +8
+ +[0-9]+: 0+518 +0 SECTION LOCAL +DEFAULT +6
+ +[0-9]+: 0+105d8 +0 SECTION LOCAL +DEFAULT +7
+ +[0-9]+: 0+10610 +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +9
- +[0-9]+: 0+10798 +0 SECTION LOCAL +DEFAULT +10
- +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +10
+ +[0-9]+: 0+10760 +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
+[0-9]+: 0+ +0 TLS +LOCAL +DEFAULT +7 gd4
+[0-9]+: 0+8 +0 TLS +LOCAL +DEFAULT +7 ld4
+[0-9]+: 0+10 +0 TLS +LOCAL +DEFAULT +7 ld5
@@ -110,9 +110,9 @@ Symbol table '\.symtab' contains 39 entr
+[0-9]+: 0+20 +0 TLS +LOCAL +DEFAULT +7 ie4
+[0-9]+: 0+28 +0 TLS +LOCAL +DEFAULT +7 le4
+[0-9]+: 0+30 +0 TLS +LOCAL +DEFAULT +7 le5
- +[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +10 \.Lie0
+ +[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +11 \.Lie0
+[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr
- +[0-9]+: 0+10648 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+10610 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
Index: ld/testsuite/ld-mmix/bpo-10.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mmix/bpo-10.d,v
retrieving revision 1.7
diff -u -p -r1.7 bpo-10.d
--- ld/testsuite/ld-mmix/bpo-10.d 20 Mar 2005 17:00:14 -0000 1.7
+++ ld/testsuite/ld-mmix/bpo-10.d 8 Jul 2005 03:26:07 -0000
@@ -12,6 +12,7 @@
SYMBOL TABLE:
0+ l d \.init 0+ (|\.init)
0+4 l d \.text 0+ (|\.text)
+0+7f8 l +d \.MMIX.reg_contents 0+ (|\.MMIX\.reg_contents)
0+ l d \*ABS\* 0+ (|\.shstrtab)
0+ l d \*ABS\* 0+ (|\.symtab)
0+ l d \*ABS\* 0+ (|\.strtab)
Index: ld/testsuite/ld-mmix/bpo-22.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mmix/bpo-22.d,v
retrieving revision 1.3
diff -u -p -r1.3 bpo-22.d
--- ld/testsuite/ld-mmix/bpo-22.d 11 Dec 2004 04:32:37 -0000 1.3
+++ ld/testsuite/ld-mmix/bpo-22.d 8 Jul 2005 03:26:07 -0000
@@ -11,8 +11,6 @@
SYMBOL TABLE:
0000000000000000 l d \.text 0+ (|\.text)
-2000000000000000 l d \.data 0+ (|\.data)
-2000000000000000 l d \.bss 0+ (|\.bss)
0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
0+ l d \*ABS\* 0+ (|\.shstrtab)
0+ l d \*ABS\* 0+ (|\.symtab)
Index: ld/testsuite/ld-mmix/sec-7m.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mmix/sec-7m.d,v
retrieving revision 1.3
diff -u -p -r1.3 sec-7m.d
--- ld/testsuite/ld-mmix/sec-7m.d 12 May 2003 05:45:38 -0000 1.3
+++ ld/testsuite/ld-mmix/sec-7m.d 8 Jul 2005 03:26:07 -0000
@@ -20,19 +20,19 @@ Sections:
Idx Name[ ]+Size[ ]+VMA[ ]+LMA[ ]+File off Algn
0 \.text[ ]+0+4 0+ 0+ 0+ 2\*\*2
[ ]+CONTENTS, ALLOC, LOAD, CODE
- 1 \.di 0+27ffb 2000000000000000 2000000000000000 0+ 2\*\*2
+ 1 \.di +0+27ffb +0+4 +0+4 +0+ +2\*\*2
[ ]+CONTENTS, READONLY
Contents of section \.text:
0000 e3fd0001[ ]+.*
Contents of section \.di:
- 2000000000000000 2a000000 00000000 00000000 00000000 .*
+ 00004 2a000000 00000000 00000000 00000000 .*
#...
- 2000000000007ff0 00000000 00000000 00000000 2b2c0000 .*
+ 07ff4 00000000 00000000 00000000 2b2c0000 .*
#...
- 200000000000fff0 00000000 00000000 00002d2e 00000000 .*
+ 0fff4 00000000 00000000 00002d2e 00000000 .*
#...
- 2000000000017ff0 00000000 00000000 002f3000 00000000 .*
+ 17ff4 00000000 00000000 002f3000 00000000 .*
#...
- 200000000001fff0 00000000 00000000 00313200 00000000 .*
+ 1fff4 00000000 00000000 00313200 00000000 .*
#...
- 2000000000027ff0 00000000 00000000 000033[ ]+.*
+ 27ff4 00000000 00000000 000033[ ]+.*
--
Alan Modra
IBM OzLabs - Linux Technology Centre