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 309892 Details for
Bug 452194
elfutils incorrectly reports assembler symbols
[?]
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]
move base check to where it works, fix comparison
diffs (text/plain), 3.41 KB, created by
Andrew Cagney
on 2008-06-20 02:16:38 UTC
(
hide
)
Description:
move base check to where it works, fix comparison
Filename:
MIME Type:
Creator:
Andrew Cagney
Created:
2008-06-20 02:16:38 UTC
Size:
3.41 KB
patch
obsolete
>diff --git a/frysk-imports/elfutils/libdwfl/ChangeLog b/frysk-imports/elfutils/libdwfl/ChangeLog >index ac95d68..e1d00f1 100644 >--- a/frysk-imports/elfutils/libdwfl/ChangeLog >+++ b/frysk-imports/elfutils/libdwfl/ChangeLog >@@ -1,3 +1,8 @@ >+2008-06-19 Andrew Cagney <cagney@redhat.com> >+ >+ * dwfl_module_addrsym.c (dwfl_module_addrsym): Correctly update >+ min_label. >+ > 2008-06-07 Andrew Cagney <cagney@redhat.com> > > * dwfl_module_getdwarf.c (open_elf): Don't align the module's load >diff --git a/frysk-imports/elfutils/libdwfl/dwfl_module_addrsym.c b/frysk-imports/elfutils/libdwfl/dwfl_module_addrsym.c >index c34a31b..77033a6 100644 >--- a/frysk-imports/elfutils/libdwfl/dwfl_module_addrsym.c >+++ b/frysk-imports/elfutils/libdwfl/dwfl_module_addrsym.c >@@ -49,10 +49,13 @@ > > #include "libdwflP.h" > >+#include <stdio.h> >+ > const char * > dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr, > GElf_Sym *closest_sym, GElf_Word *shndxp) > { >+ // fprintf(stderr, "looking up %lx\n", (long) addr); > int syments = INTUSE(dwfl_module_getsymtab) (mod); > if (syments < 0) > return NULL; >@@ -116,15 +119,20 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr, > GElf_Sym sym; > GElf_Word shndx; > const char *name = INTUSE(dwfl_module_getsym) (mod, i, &sym, &shndx); >+ // fprintf(stderr, "symbol %s at 0x%lx 0x%ld\n", name, (long) sym.st_value, (long) sym.st_size); >+ /* Even if we don't choose this symbol, its existence excludes >+ any sizeless symbol (assembly label) that is below its upper >+ bound. */ >+ if (name != NULL && sym.st_value <= addr >+ && sym.st_value + sym.st_size > min_label) { >+ min_label = sym.st_value + sym.st_size; >+ // fprintf(stderr, " min to %s size ends at %lx\n", name, (long) min_label); >+ } > if (name != NULL > && sym.st_value <= addr > && (sym.st_size == 0 || addr - sym.st_value < sym.st_size)) > { >- /* Even if we don't choose this symbol, its existence >- excludes any sizeless symbol (assembly label) that >- is inside its bounds. */ >- if (sym.st_value + sym.st_size > addr) >- min_label = sym.st_value + sym.st_size; >+ // fprintf(stderr, " candidate %s at 0x%lx 0x%ld\n", name, (long) sym.st_value, (long) sym.st_size); > > /* This symbol is a better candidate than the current one > if it's a named symbol, not a section or file symbol, >@@ -140,6 +148,7 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr, > { > if (sym.st_size != 0) > { >+ // fprintf(stderr, " closest %s at %lx\n", name, (long)sym.st_value); > *closest_sym = sym; > closest_shndx = shndx; > closest_name = name; >@@ -155,6 +164,7 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr, > || (sizeless_sym.st_value == sym.st_value > && strcmp(name, sizeless_name) < 0)) > { >+ // fprintf(stderr, " sizeless %s at %lx\n", name, (long)sym.st_value); > sizeless_sym = sym; > sizeless_shndx = shndx; > sizeless_name = name; >@@ -171,6 +181,7 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr, > || (closest_sym->st_size == sym.st_size > && strcmp(name, closest_name) < 0))) > { >+ // fprintf(stderr, " alt closest %s at %lx\n", name, (long)sym.st_value); > *closest_sym = sym; > closest_shndx = shndx; > closest_name = name;
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 452194
:
309892
|
314191
|
314192
|
314194