aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-09-07 15:02:17 +0000
committerNick Clifton <nickc@redhat.com>2010-09-07 15:02:17 +0000
commit3dbcc61de69ac77c852c865edb2720bc45e13d86 (patch)
tree9506079f65c591a688c24babf84b1312ecb0173d /ld/ldwrite.c
parentFix custom bcache hash regression. (diff)
downloadbinutils-gdb-3dbcc61de69ac77c852c865edb2720bc45e13d86.tar.gz
binutils-gdb-3dbcc61de69ac77c852c865edb2720bc45e13d86.tar.bz2
binutils-gdb-3dbcc61de69ac77c852c865edb2720bc45e13d86.zip
* ldwrite.c (clone_section): Call bfd_copy_private_section_data on
newly cloned section. * ld-x86-64/split-by-file.rd: New test. * ld-x86-64/split-by-file1.s: New test source code. * ld-x86-64/split-by-file2.s: New test source code. * ld-x86-64/x86-64.exp: Run the new test. * readelf.c (process_section_headers): Mention meaning of 'l' section flag for x86-64 targets.
Diffstat (limited to 'ld/ldwrite.c')
-rw-r--r--ld/ldwrite.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ld/ldwrite.c b/ld/ldwrite.c
index 2ff95472d63..7eb8b2b01d3 100644
--- a/ld/ldwrite.c
+++ b/ld/ldwrite.c
@@ -358,7 +358,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
}
tname[5] = 0;
}
-
+
if ((sname = bfd_get_unique_section_name (abfd, tname, count)) == NULL
|| (n = bfd_make_section_anyway (abfd, sname)) == NULL
|| (h = bfd_link_hash_lookup (link_info.hash,
@@ -369,7 +369,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
return NULL;
}
free (tname);
-
+
/* Set up section symbol. */
h->type = bfd_link_hash_defined;
h->u.def.value = 0;
@@ -385,6 +385,9 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
n->orelocation = 0;
n->reloc_count = 0;
n->alignment_power = s->alignment_power;
+
+ bfd_copy_private_section_data (abfd, s, abfd, n);
+
return n;
}