summaryrefslogtreecommitdiff
path: root/bfd/elf-eh-frame.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-04-27 12:03:39 +0930
committerAlan Modra <amodra@gmail.com>2017-04-27 12:03:39 +0930
commit76c20d54ca5042e11af9ddf5723cc24cf47736ec (patch)
treea14eafe2cdfe94597edefc9ff9ad56131fd90bf3 /bfd/elf-eh-frame.c
parentd7153c4ac333c9127c18efcf184607d368bb142d (diff)
downloadbinutils-gdb-76c20d54ca5042e11af9ddf5723cc24cf47736ec.tar.gz
Constify elf_backend_eh_frame_address_size
* elf-bfd.h (struct elf_backend_data): Make asection param of elf_backend_eh_frame_address_size const. (_bfd_elf_eh_frame_address_size): Likewise. * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise. * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise. * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise. * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise. * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise. (next_cie_fde_offset): Constify params. (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
Diffstat (limited to 'bfd/elf-eh-frame.c')
-rw-r--r--bfd/elf-eh-frame.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 1af6f309083..52ba9c62138 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -326,9 +326,9 @@ size_of_output_cie_fde (struct eh_cie_fde *entry)
/* Return the offset of the FDE or CIE after ENT. */
static unsigned int
-next_cie_fde_offset (struct eh_cie_fde *ent,
- struct eh_cie_fde *last,
- asection *sec)
+next_cie_fde_offset (const struct eh_cie_fde *ent,
+ const struct eh_cie_fde *last,
+ const asection *sec)
{
while (++ent < last)
{
@@ -1334,7 +1334,7 @@ find_merged_cie (bfd *abfd, struct bfd_link_info *info, asection *sec,
after .eh_frame editing. */
static bfd_signed_vma
-offset_adjust (bfd_vma offset, asection *sec)
+offset_adjust (bfd_vma offset, const asection *sec)
{
struct eh_frame_sec_info *sec_info
= (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info;
@@ -1442,7 +1442,7 @@ _bfd_elf_adjust_eh_frame_global_symbol (struct elf_link_hash_entry *h,
if any symbol was changed. */
static int
-adjust_eh_frame_local_symbols (asection *sec,
+adjust_eh_frame_local_symbols (const asection *sec,
struct elf_reloc_cookie *cookie)
{
unsigned int shndx;
@@ -2546,7 +2546,7 @@ _bfd_elf_write_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
/* Return the width of FDE addresses. This is the default implementation. */
unsigned int
-_bfd_elf_eh_frame_address_size (bfd *abfd, asection *sec ATTRIBUTE_UNUSED)
+_bfd_elf_eh_frame_address_size (bfd *abfd, const asection *sec ATTRIBUTE_UNUSED)
{
return elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64 ? 8 : 4;
}