Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/misoc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 10773db08d76
Choose a base ref
...
head repository: m-labs/misoc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b8a556872dec
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Aug 2, 2015

  1. libdyld: R_*_RELATIVE never specify a symbol.

    whitequark committed Aug 2, 2015
    Copy the full SHA
    36e03ec View commit details
  2. Copy the full SHA
    b8a5568 View commit details
Showing with 6 additions and 2 deletions.
  1. +6 −2 software/libdyld/dyld.c
8 changes: 6 additions & 2 deletions software/libdyld/dyld.c
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ static int fixup_rela(struct dyld_info *info, Elf32_Rela *rela,
return 1; // Does nothing.

case R_OR1K_RELATIVE:
value = info->base + (sym ? sym->st_value : 0) + rela->r_addend;
value = info->base + rela->r_addend;
break;

case R_OR1K_32:
@@ -171,5 +171,9 @@ void *dyld_lookup(const char *symbol, struct dyld_info *info) {
index = info->hash.chain[index];
}

return (void*)(info->base + info->symtab[index].st_value);
Elf32_Addr value = info->symtab[index].st_value;
if(value != NULL)
return (void*)(info->base + value);
else
return NULL;
}