diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-11-12 06:21:05 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-11-12 06:21:05 +0000 |
commit | 07a3ce9f1604b10a6c8fad7904ba6744910a100e (patch) | |
tree | 26e9e45c781693807d0c0d170f115828bd33ba38 /bfd/elf-eh-frame.c | |
parent | 0f2a6ca02771f9aae80ef3fa6f4992ea23803554 (diff) | |
download | gdb-07a3ce9f1604b10a6c8fad7904ba6744910a100e.tar.gz |
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
relocs for discarded FDEs. Remove dead code.
(_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
* elflink.h (elf_bfd_discard_info): Don't save edited relocs.
Tidy conditions under which stabs are edited. Formatting.
* elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
from discarded relocs.
* elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
section adjustments after testing magic values.
Diffstat (limited to 'bfd/elf-eh-frame.c')
-rw-r--r-- | bfd/elf-eh-frame.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index b6d2d2f8087..d5f4cc5ad49 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -299,7 +299,6 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec, unsigned int leb128_tmp; unsigned int cie_usage_count, last_cie_ndx, i, offset; unsigned int make_relative, make_lsda_relative; - Elf_Internal_Rela *rel; bfd_size_type new_size; unsigned int ptr_size; @@ -555,10 +554,9 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec, + ((buf - ehbuf + per_width - 1) & ~((bfd_size_type) per_width - 1))); ENSURE_NO_RELOCS (buf); - rel = GET_RELOC (buf); /* Ensure we have a reloc here, against a global symbol. */ - if (rel != NULL) + if (GET_RELOC (buf) != NULL) { unsigned long r_symndx; @@ -626,8 +624,7 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec, goto free_no_table; ENSURE_NO_RELOCS (buf); - rel = GET_RELOC (buf); - if (rel == NULL) + if (GET_RELOC (buf) == NULL) /* This should not happen. */ goto free_no_table; if ((*reloc_symbol_deleted_p) (buf - ehbuf, cookie)) @@ -636,7 +633,6 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec, be deleted. */ new_size -= hdr.length + 4; sec_info->entry[sec_info->count].removed = 1; - memset (rel, 0, sizeof (*rel)); } else { @@ -654,7 +650,6 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec, cie_usage_count++; hdr_info->fde_count++; } - cookie->rel = rel; if (cie.lsda_encoding != DW_EH_PE_omit) { unsigned int dummy; @@ -751,10 +746,6 @@ _bfd_elf_discard_section_eh_frame_hdr (abfd, info, sec) asection *sec; { struct eh_frame_hdr_info *hdr_info; - unsigned int ptr_size; - - ptr_size = (elf_elfheader (abfd)->e_ident[EI_CLASS] - == ELFCLASS64) ? 8 : 4; if ((elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_EH_FRAME_HDR) @@ -1179,14 +1170,10 @@ _bfd_elf_write_section_eh_frame_hdr (abfd, sec) asection *sec; { struct eh_frame_hdr_info *hdr_info; - unsigned int ptr_size; bfd_byte *contents; asection *eh_frame_sec; bfd_size_type size; - ptr_size = (elf_elfheader (sec->owner)->e_ident[EI_CLASS] - == ELFCLASS64) ? 8 : 4; - BFD_ASSERT (elf_section_data (sec)->sec_info_type == ELF_INFO_TYPE_EH_FRAME_HDR); hdr_info = (struct eh_frame_hdr_info *) |