diff options
| author | Ulrich Drepper <drepper@redhat.com> | 2001-09-22 21:32:57 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 2001-09-22 21:32:57 +0000 |
| commit | 8755441d32dec7eb305bdfe8eb50a8712c265f2c (patch) | |
| tree | 88cd4487b3e8d41a240195104c1ffc139a4c1ec7 /sysdeps/alpha | |
| parent | 177ac300b9ed6d3515994c245b2528dd4745ec78 (diff) | |
| download | glibc-8755441d32dec7eb305bdfe8eb50a8712c265f2c.tar.xz glibc-8755441d32dec7eb305bdfe8eb50a8712c265f2c.zip | |
(elf_machine_load_address): Compute the difference between base address and
first PT_LOAD's virtual address, not the base address.
Diffstat (limited to 'sysdeps/alpha')
| -rw-r--r-- | sysdeps/alpha/dl-machine.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 2a414ca448..a039f245db 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -70,16 +70,20 @@ elf_machine_load_address (void) Elf64_Addr dot; long int zero_disp; - asm("br %0, 1f\n\t" - ".weak __load_address_undefined\n\t" - "br $0, __load_address_undefined\n" - "1:" + asm("br %0, 1f\n" + "0:\n\t" + "br $0, 2f\n" + "1:\n\t" + ".data\n" + "2:\n\t" + ".quad 0b\n\t" + ".previous" : "=r"(dot)); - zero_disp = *(int *)dot; + zero_disp = *(int *) dot; zero_disp = (zero_disp << 43) >> 41; - return dot + 4 + zero_disp; + return dot - *(Elf64_Addr *) (dot + 4 + zero_disp); } /* Set up the loaded object described by L so its unrelocated PLT |
