Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 314238 Details for
Bug 458950
Corrupt eh_frame_hdr in LLVM
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
FIx.
llvm-binutils.patch (text/plain), 4.30 KB, created by
Jan Kratochvil
on 2008-08-13 19:12:37 UTC
(
hide
)
Description:
FIx.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2008-08-13 19:12:37 UTC
Size:
4.30 KB
patch
obsolete
>bfd/ >2008-08-13 Jan Kratochvil <jan.kratochvil@redhat.com> > > Do not consider FDEs to discarded sections as invalid. > * elf-eh-frame.c (_bfd_elf_parse_eh_frame): New REQUIRE_CLEARED_RELOCS. > Consider FDEs with cleared relocations as valid and ignorable. > >binutils/ >2008-08-13 Jan Kratochvil <jan.kratochvil@redhat.com> > > Suppress warnings on NONE relocations to discarded sections. > * readelf.c (is_none_reloc): New function. > (debug_apply_relocations): Ignore is_none_reloc() relocations. > >--- bfd/elf-eh-frame.c 21 Jul 2008 07:49:58 -0000 1.71 >+++ bfd/elf-eh-frame.c 13 Aug 2008 18:40:13 -0000 >@@ -549,6 +550,16 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru > < (bfd_size_type) ((buf) - ehbuf))) \ > cookie->rel++ > >+#define REQUIRE_CLEARED_RELOCS(buf) \ >+ while (cookie->rel < cookie->relend \ >+ && (cookie->rel->r_offset \ >+ < (bfd_size_type) ((buf) - ehbuf))) \ >+ { \ >+ REQUIRE (cookie->rel->r_info == 0); \ >+ REQUIRE (cookie->rel->r_addend == 0); \ >+ cookie->rel++; \ >+ } >+ > #define GET_RELOC(buf) \ > ((cookie->rel < cookie->relend \ > && (cookie->rel->r_offset \ >@@ -766,9 +780,15 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru > > /* Chain together the FDEs for each section. */ > rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie); >- REQUIRE (rsec && rsec->owner == abfd); >- this_inf->u.fde.next_for_section = elf_fde_list (rsec); >- elf_fde_list (rsec) = this_inf; >+ /* RSEC will be NULL if FDE was cleared as it was for discarded >+ SHT_GROUP. Check its content and its relocation entries have been >+ all cleared. */ >+ if (rsec) >+ { >+ REQUIRE (rsec->owner == abfd); >+ this_inf->u.fde.next_for_section = elf_fde_list (rsec); >+ elf_fde_list (rsec) = this_inf; >+ } > > /* Skip the initial location and address range. */ > start = buf; >@@ -801,7 +821,17 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru > insns = buf; > > buf = last_fde + 4 + hdr_length; >- SKIP_RELOCS (buf); >+ >+ /* Cleared FDE? The instructions will not be cleared, only all its >+ relocation entries. */ >+ if (rsec == NULL) >+ { >+ REQUIRE_CLEARED_RELOCS (buf); >+ } >+ else >+ { >+ SKIP_RELOCS (buf); >+ } > } > > /* Try to interpret the CFA instructions and find the first >--- binutils/readelf.c 8 Aug 2008 19:24:48 -0000 1.423 >+++ binutils/readelf.c 13 Aug 2008 18:40:18 -0000 >@@ -8254,6 +8254,52 @@ is_16bit_abs_reloc (unsigned int reloc_t > } > } > >+/* Returns TRUE iff RELOC_TYPE is a NONE relocation used for discarded relocation entries (possibly formerly used for SHT_GROUP sections). */ >+ >+static bfd_boolean >+is_none_reloc (unsigned int reloc_type) >+{ >+ switch (elf_header.e_machine) >+ { >+ case EM_68K: >+ return reloc_type == 0; /* R_68K_NONE. */ >+ case EM_386: >+ return reloc_type == 0; /* R_386_NONE. */ >+ case EM_SPARC32PLUS: >+ case EM_SPARCV9: >+ case EM_SPARC: >+ return reloc_type == 0; /* R_SPARC_NONE. */ >+ case EM_MIPS: >+ return reloc_type == 0; /* R_MIPS_NONE. */ >+ case EM_PARISC: >+ return reloc_type == 0; /* R_PARISC_NONE. */ >+ case EM_ALPHA: >+ return reloc_type == 0; /* R_ALPHA_NONE. */ >+ case EM_PPC: >+ return reloc_type == 0; /* R_PPC_NONE. */ >+ case EM_PPC64: >+ return reloc_type == 0; /* R_PPC64_NONE. */ >+ case EM_ARM: >+ return reloc_type == 0; /* R_ARM_NONE. */ >+ case EM_IA_64: >+ return reloc_type == 0; /* R_IA64_NONE. */ >+ case EM_SH: >+ return reloc_type == 0; /* R_SH_NONE. */ >+ case EM_S390_OLD: >+ case EM_S390: >+ return reloc_type == 0; /* R_390_NONE. */ >+ case EM_CRIS: >+ return reloc_type == 0; /* R_CRIS_NONE. */ >+ case EM_X86_64: >+ return reloc_type == 0; /* R_X86_64_NONE. */ >+ case EM_MN10300: >+ return reloc_type == 0; /* R_MN10300_NONE. */ >+ case EM_M32R: >+ return reloc_type == 0; /* R_M32R_NONE. */ >+ } >+ return FALSE; >+} >+ > /* Uncompresses a section that was compressed using zlib, in place. > * This is a copy of bfd_uncompress_section_contents, in bfd/compress.c */ > >@@ -8389,6 +8435,9 @@ debug_apply_relocations (void *file, > > reloc_type = get_reloc_type (rp->r_info); > >+ if (is_none_reloc (reloc_type)) >+ continue; >+ > if (is_32bit_abs_reloc (reloc_type) > || is_32bit_pcrel_reloc (reloc_type)) > reloc_size = 4;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 458950
: 314238