diff options
author | Nick Clifton <nickc@redhat.com> | 2000-07-18 19:20:13 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-07-18 19:20:13 +0000 |
commit | 125c4a69c4572195571873dccbc31434bba53ddd (patch) | |
tree | 0d095b7f92db4dc53a58c57370f2d1a108ae150e /bfd/bfd.c | |
parent | 6dbb55b6008eb48d0e6aa30f859fb8cacd4986ea (diff) | |
download | gdb-125c4a69c4572195571873dccbc31434bba53ddd.zip gdb-125c4a69c4572195571873dccbc31434bba53ddd.tar.gz gdb-125c4a69c4572195571873dccbc31434bba53ddd.tar.bz2 |
Rename bfd_elf_get_arch_size to bfd_get_arch_size
Rename bfd_elf_get_sign_extend_vma to bfd_get_sign_extend_vma
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r-- | bfd/bfd.c | 59 |
1 files changed, 59 insertions, 0 deletions
@@ -706,6 +706,65 @@ _bfd_abort (file, line, fn) /* FUNCTION + bfd_get_arch_size + +SYNOPSIS + int bfd_get_arch_size (bfd *abfd); + +DESCRIPTION + Returns the architecture address size, in bits, as determined + by the object file's format. For ELF, this information is + included in the header. + +RETURNS + Returns the arch size in bits if known, <<-1>> otherwise. +*/ + +int +bfd_get_arch_size (abfd) + bfd *abfd; +{ + if (abfd->xvec->flavour == bfd_target_elf_flavour) + return (get_elf_backend_data (abfd))->s->arch_size; + + bfd_set_error (bfd_error_wrong_format); + return -1; +} + +/* +FUNCTION + bfd_get_sign_extend_vma + +SYNOPSIS + int bfd_get_sign_extend_vma (bfd *abfd); + +DESCRIPTION + Indicates if the target architecture "naturally" sign extends + an address. Some architectures implicitly sign extend address + values when they are converted to types larger than the size + of an address. For instance, bfd_get_start_address() will + return an address sign extended to fill a bfd_vma when this is + the case. + +RETURNS + Returns <<1>> if the target architecture is known to sign + extend addresses, <<0>> if the target architecture is known to + not sign extend addresses, and <<-1>> otherwise. +*/ + +int +bfd_get_sign_extend_vma (abfd) + bfd *abfd; +{ + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) + return (get_elf_backend_data (abfd)->sign_extend_vma); + + bfd_set_error (bfd_error_wrong_format); + return -1; +} + +/* +FUNCTION bfd_set_start_address SYNOPSIS |