diff options
author | J.T. Conklin <jtc@acorntoolworks.com> | 1996-02-21 00:29:38 +0000 |
---|---|---|
committer | J.T. Conklin <jtc@acorntoolworks.com> | 1996-02-21 00:29:38 +0000 |
commit | 871a3f3b24ff84e37f859434993327ef2efba3d0 (patch) | |
tree | b39d6fe05070c37356d2628cc57432e7424c5752 /bfd/bfd.c | |
parent | 8b495156a4aa593919ad0b9a4b79d97616d6a05d (diff) | |
download | gdb-871a3f3b24ff84e37f859434993327ef2efba3d0.zip gdb-871a3f3b24ff84e37f859434993327ef2efba3d0.tar.gz gdb-871a3f3b24ff84e37f859434993327ef2efba3d0.tar.bz2 |
* bfd.c (tdata): Add netbsd_core_data.
* bfd-in2.h: Regenerated.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r-- | bfd/bfd.c | 36 |
1 files changed, 35 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* Generic BFD library interface and support routines. - Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. + Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -175,6 +175,7 @@ CODE_FRAGMENT . struct osf_core_struct *osf_core_data; . struct cisco_core_struct *cisco_core_data; . struct versados_data_struct *versados_data; +. struct netbsd_core_struct *netbsd_core_data; . PTR any; . } tdata; . @@ -814,6 +815,39 @@ bfd_set_gp_size (abfd, i) elf_gp_size (abfd) = i; } +/* Get the GP value. This is an internal function used by some of the + relocation special_function routines on targets which support a GP + register. */ + +bfd_vma +_bfd_get_gp_value (abfd) + bfd *abfd; +{ + if (abfd->format == bfd_object) + { + if (abfd->xvec->flavour == bfd_target_ecoff_flavour) + return ecoff_data (abfd)->gp; + else if (abfd->xvec->flavour == bfd_target_elf_flavour) + return elf_gp (abfd); + } + return 0; +} + +/* Set the GP value. */ + +void +_bfd_set_gp_value (abfd, v) + bfd *abfd; + bfd_vma v; +{ + if (abfd->format != bfd_object) + return; + if (abfd->xvec->flavour == bfd_target_ecoff_flavour) + ecoff_data (abfd)->gp = v; + else if (abfd->xvec->flavour == bfd_target_elf_flavour) + elf_gp (abfd) = v; +} + /* FUNCTION bfd_scan_vma |