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 698787 Details for
Bug 912271
Dwarf debuginfo is reported as stripped, but it's not
[?]
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]
propposed patch
file-readelf-dwarf.patch (text/plain), 3.10 KB, created by
Jan Kaluža
on 2013-02-18 09:15:05 UTC
(
hide
)
Description:
propposed patch
Filename:
MIME Type:
Creator:
Jan Kaluža
Created:
2013-02-18 09:15:05 UTC
Size:
3.10 KB
patch
obsolete
>diff --git a/src/elfclass.h b/src/elfclass.h >index 2e7741b..280f4d2 100644 >--- a/src/elfclass.h >+++ b/src/elfclass.h >@@ -59,7 +59,8 @@ > (off_t)elf_getu(swap, elfhdr.e_shoff), > elf_getu16(swap, elfhdr.e_shnum), > (size_t)elf_getu16(swap, elfhdr.e_shentsize), >- fsize, &flags, elf_getu16(swap, elfhdr.e_machine)) == -1) >+ fsize, &flags, elf_getu16(swap, elfhdr.e_machine), >+ (int)elf_getu16(swap, elfhdr.e_shstrndx)) == -1) > return -1; > break; > >diff --git a/src/readelf.c b/src/readelf.c >index 8212330..2f96a49 100644 >--- a/src/readelf.c >+++ b/src/readelf.c >@@ -48,7 +48,7 @@ private int dophn_core(struct magic_set *, int, int, int, off_t, int, size_t, > private int dophn_exec(struct magic_set *, int, int, int, off_t, int, size_t, > off_t, int *, int); > private int doshn(struct magic_set *, int, int, int, off_t, int, size_t, >- off_t, int *, int); >+ off_t, int *, int, int); > private size_t donote(struct magic_set *, void *, size_t, size_t, int, > int, size_t, int *); > >@@ -154,6 +154,9 @@ getu64(int swap, uint64_t value) > #define xsh_type (clazz == ELFCLASS32 \ > ? elf_getu32(swap, sh32.sh_type) \ > : elf_getu32(swap, sh64.sh_type)) >+#define xsh_name (clazz == ELFCLASS32 \ >+ ? elf_getu32(swap, sh32.sh_name) \ >+ : elf_getu32(swap, sh64.sh_name)) > #define xph_addr (clazz == ELFCLASS32 \ > ? (void *) &ph32 \ > : (void *) &ph64) >@@ -851,15 +854,16 @@ static const cap_desc_t cap_desc_386[] = { > > private int > doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, >- size_t size, off_t fsize, int *flags, int mach) >+ size_t size, off_t fsize, int *flags, int mach, int strtab) > { > Elf32_Shdr sh32; > Elf64_Shdr sh64; > int stripped = 1; > void *nbuf; >- off_t noff, coff; >+ off_t noff, coff, name_off; > uint64_t cap_hw1 = 0; /* SunOS 5.x hardware capabilites */ > uint64_t cap_sf1 = 0; /* SunOS 5.x software capabilites */ >+ char name[50]; > > if (size != xsh_sizeof) { > if (file_printf(ms, ", corrupted section header size") == -1) >@@ -867,6 +871,18 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, > return 0; > } > >+ /* Read offset of name section to be able to read section names later. */ >+ if (lseek(fd, off + size*strtab, SEEK_SET) == (off_t)-1) { >+ file_badseek(ms); >+ return -1; >+ } >+ if (read(fd, xsh_addr, xsh_sizeof) == -1) { >+ file_badread(ms); >+ return -1; >+ } >+ >+ name_off = xsh_offset; >+ > for ( ; num; num--) { > if (lseek(fd, off, SEEK_SET) == (off_t)-1) { > file_badseek(ms); >@@ -876,8 +892,23 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, > file_badread(ms); > return -1; > } >+ >+ /* Read the name of this section. */ >+ if (lseek(fd, name_off + xsh_name, SEEK_SET) == (off_t)-1) { >+ file_badseek(ms); >+ return -1; >+ } >+ if (read(fd, &name, sizeof(name)) == -1) { >+ file_badread(ms); >+ return -1; >+ } >+ name[sizeof(name) - 1] = 0; > off += size; > >+ if (strcmp(name, ".debug_info") == 0) { >+ stripped = 0; >+ } >+ > /* Things we can determine before we seek */ > switch (xsh_type) { > case SHT_SYMTAB:
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 912271
: 698787