aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1998-08-10 22:35:02 +0000
committerRichard Henderson <rth@redhat.com>1998-08-10 22:35:02 +0000
commit7993f96a80cf1fd08955c55d3ec3215680bf15e8 (patch)
tree6c4f717b172186e018b7a2b412d40652923c2d8e /bfd/elflink.h
parent54af55918bf3417f5d60e98bb1a213e186a462ce (diff)
downloadgdb-7993f96a80cf1fd08955c55d3ec3215680bf15e8.zip
gdb-7993f96a80cf1fd08955c55d3ec3215680bf15e8.tar.gz
gdb-7993f96a80cf1fd08955c55d3ec3215680bf15e8.tar.bz2
* elflink.h (elf_gc_common_finalize_got_offsets): For backends
that use a .got.plt section start the got offset at zero.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 65b828c..67493cb 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -5803,7 +5803,15 @@ elf_gc_common_finalize_got_offsets (abfd, info)
struct bfd_link_info *info;
{
bfd *i;
- bfd_vma gotoff = get_elf_backend_data (abfd)->got_header_size;
+ struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ bfd_vma gotoff;
+
+ /* The GOT offset is relative to the .got section, but the GOT header is
+ put into the .got.plt section, if the backend uses it. */
+ if (bed->want_got_plt)
+ gotoff = 0;
+ else
+ gotoff = bed->got_header_size;
/* Do the local .got entries first. */
for (i = info->input_bfds; i; i = i->link_next)