diff options
| -rw-r--r-- | libdwfl/ChangeLog | 5 | ||||
| -rw-r--r-- | libdwfl/relocate.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 2cac0dee..f6698255 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,8 @@ +2010-01-06 Roland McGrath <[email protected]> + + * relocate.c (relocate_getsym): For SHN_COMMON, zero st_value. + (relocate_section): Let unresolved SHN_COMMON symbol stay 0. + 2009-11-16 Roland McGrath <[email protected]> * relocate.c (relocate_section): Skip SHT_NOBITS or empty target scn. diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c index 2e37c641..121a481b 100644 --- a/libdwfl/relocate.c +++ b/libdwfl/relocate.c @@ -191,7 +191,10 @@ relocate_getsym (Dwfl_Module *mod, { case SHN_ABS: case SHN_UNDEF: + return DWFL_E_NOERROR; + case SHN_COMMON: + sym->st_value = 0; /* Value is size, not helpful. */ return DWFL_E_NOERROR; } @@ -350,7 +353,8 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, { /* Maybe we can figure it out anyway. */ error = resolve_symbol (mod, reloc_symtab, &sym, shndx); - if (error != DWFL_E_NOERROR) + if (error != DWFL_E_NOERROR + && !(error == DWFL_E_RELUNDEF && shndx == SHN_COMMON)) return error; } |
