PERFORCE change 55046 for review
Peter Wemm
peter at FreeBSD.org
Tue Jun 15 21:07:35 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=55046
Change 55046 by peter at peter_daintree on 2004/06/15 21:06:29
Argh. The search_symbol methods need to compensate for the bases too.
I think its time to switch to iedwose's alternate strategy.
Affected files ...
.. //depot/projects/hammer/sys/kern/link_elf_obj.c#41 edit
Differences ...
==== //depot/projects/hammer/sys/kern/link_elf_obj.c#41 (text+ko) ====
@@ -772,6 +772,7 @@
u_long off = (uintptr_t) (void *) value;
u_long diff = off;
u_long st_value;
+ Elf_Addr base;
const Elf_Sym *es;
const Elf_Sym *best = 0;
int i;
@@ -779,7 +780,10 @@
for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) {
if (es->st_name == 0)
continue;
- st_value = es->st_value + (uintptr_t) (void *) ef->address;
+ base = findbase(ef, es->st_shndx);
+ if (base == 0)
+ base = (Elf_Addr)ef->address;
+ st_value = es->st_value + base;
if (off >= st_value) {
if (off - st_value < diff) {
diff = off - st_value;
More information about the p4-projects
mailing list