mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
2000-11-15 H.J. Lu <hjl@gnu.org> * sysdeps/generic/ldsodefs.h (DL_DT_INIT_ADDRESS): Defined if ELF_FUNCTION_PTR_IS_SPECIAL is not defined. (DL_DT_FINI_ADDRESS): Likewise. * sysdeps/ia64/dl-lookupcfg.h (_dl_lookup_address): Set the return type to ElfW(Addr). (_dl_function_address): New prototype. (DL_FUNCTION_ADDRESS): Defined. (DL_DT_INIT_ADDRESS): Defined as DL_FUNCTION_ADDRESS. (DL_DT_FINI_ADDRESS): Likewise. * sysdeps/ia64/Versions (GLIBC_2.2): Add _dl_function_address. * sysdeps/ia64/dl-machine.h (_dl_start_address): Removed. (ELF_MACHINE_START_ADDRESS): Changed to DL_FUNCTION_ADDRESS. * sysdeps/ia64/dl-symaddr.c (_dl_start_address): Renamed to ... (_dl_function_address): This. * elf/dl-fini.c (_dl_fini): Use DL_DT_FINI_ADDRESS to get the function pointer for DT_FINI. * elf/dl-close.c (_dl_close): Likewise. * elf/dl-init.c (_dl_init): Use DL_DT_INIT_ADDRESS to get the function pointer for DT_INIT. 2000-11-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/generic/printf_fphex.c (__printf_fphex): Compute correctly end of wexpbuf buffer.
This commit is contained in:
33
ChangeLog
33
ChangeLog
@ -1,3 +1,36 @@
|
|||||||
|
2000-11-15 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
|
* sysdeps/generic/ldsodefs.h (DL_DT_INIT_ADDRESS): Defined if
|
||||||
|
ELF_FUNCTION_PTR_IS_SPECIAL is not defined.
|
||||||
|
(DL_DT_FINI_ADDRESS): Likewise.
|
||||||
|
|
||||||
|
* sysdeps/ia64/dl-lookupcfg.h (_dl_lookup_address): Set the
|
||||||
|
return type to ElfW(Addr).
|
||||||
|
(_dl_function_address): New prototype.
|
||||||
|
(DL_FUNCTION_ADDRESS): Defined.
|
||||||
|
(DL_DT_INIT_ADDRESS): Defined as DL_FUNCTION_ADDRESS.
|
||||||
|
(DL_DT_FINI_ADDRESS): Likewise.
|
||||||
|
|
||||||
|
* sysdeps/ia64/Versions (GLIBC_2.2): Add _dl_function_address.
|
||||||
|
|
||||||
|
* sysdeps/ia64/dl-machine.h (_dl_start_address): Removed.
|
||||||
|
(ELF_MACHINE_START_ADDRESS): Changed to DL_FUNCTION_ADDRESS.
|
||||||
|
|
||||||
|
* sysdeps/ia64/dl-symaddr.c (_dl_start_address): Renamed to ...
|
||||||
|
(_dl_function_address): This.
|
||||||
|
|
||||||
|
* elf/dl-fini.c (_dl_fini): Use DL_DT_FINI_ADDRESS to get the
|
||||||
|
function pointer for DT_FINI.
|
||||||
|
* elf/dl-close.c (_dl_close): Likewise.
|
||||||
|
|
||||||
|
* elf/dl-init.c (_dl_init): Use DL_DT_INIT_ADDRESS to get the
|
||||||
|
function pointer for DT_INIT.
|
||||||
|
|
||||||
|
2000-11-16 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/generic/printf_fphex.c (__printf_fphex): Compute correctly
|
||||||
|
end of wexpbuf buffer.
|
||||||
|
|
||||||
2000-11-16 Andreas Jaeger <aj@suse.de>
|
2000-11-16 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Remove duplicate
|
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Remove duplicate
|
||||||
|
@ -152,7 +152,8 @@ _dl_close (void *_map)
|
|||||||
|
|
||||||
/* Next try the old-style destructor. */
|
/* Next try the old-style destructor. */
|
||||||
if (imap->l_info[DT_FINI] != NULL)
|
if (imap->l_info[DT_FINI] != NULL)
|
||||||
(*(void (*) (void)) ((void *) imap->l_addr
|
(*(void (*) (void)) DL_DT_FINI_ADDRESS
|
||||||
|
(imap, (void *) imap->l_addr
|
||||||
+ imap->l_info[DT_FINI]->d_un.d_ptr)) ();
|
+ imap->l_info[DT_FINI]->d_un.d_ptr)) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ _dl_fini (void)
|
|||||||
|
|
||||||
/* Next try the old-style destructor. */
|
/* Next try the old-style destructor. */
|
||||||
if (l->l_info[DT_FINI] != NULL)
|
if (l->l_info[DT_FINI] != NULL)
|
||||||
((fini_t) (l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr)) ();
|
((fini_t) DL_DT_FINI_ADDRESS (l, l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr)) ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,8 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
|
|||||||
*/
|
*/
|
||||||
if (l->l_info[DT_INIT] != NULL)
|
if (l->l_info[DT_INIT] != NULL)
|
||||||
{
|
{
|
||||||
init = (init_t) (l->l_addr + l->l_info[DT_INIT]->d_un.d_ptr);
|
init = (init_t) DL_DT_INIT_ADDRESS
|
||||||
|
(l, l->l_addr + l->l_info[DT_INIT]->d_un.d_ptr);
|
||||||
|
|
||||||
/* Call the function. */
|
/* Call the function. */
|
||||||
init (argc, argv, env);
|
init (argc, argv, env);
|
||||||
|
@ -70,6 +70,8 @@ typedef ElfW(Addr) lookup_t;
|
|||||||
# define DL_SYMBOL_ADDRESS(map, ref) \
|
# define DL_SYMBOL_ADDRESS(map, ref) \
|
||||||
(void *) (LOOKUP_VALUE_ADDRESS (map) + ref->st_value)
|
(void *) (LOOKUP_VALUE_ADDRESS (map) + ref->st_value)
|
||||||
# define DL_LOOKUP_ADDRESS(addr) ((ElfW(Addr)) (addr))
|
# define DL_LOOKUP_ADDRESS(addr) ((ElfW(Addr)) (addr))
|
||||||
|
# define DL_DT_INIT_ADDRESS(map, start) (start)
|
||||||
|
# define DL_DT_FINI_ADDRESS(map, start) (start)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Unmap a loaded object, called by _dl_close (). */
|
/* Unmap a loaded object, called by _dl_close (). */
|
||||||
|
@ -2,5 +2,6 @@ ld {
|
|||||||
GLIBC_2.2 {
|
GLIBC_2.2 {
|
||||||
# ia64 specific functions in the dynamic linker, but used by libc.so.
|
# ia64 specific functions in the dynamic linker, but used by libc.so.
|
||||||
_dl_symbol_address; _dl_unmap; _dl_lookup_address;
|
_dl_symbol_address; _dl_unmap; _dl_lookup_address;
|
||||||
|
_dl_function_address;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,14 +23,22 @@
|
|||||||
#define ELF_FUNCTION_PTR_IS_SPECIAL
|
#define ELF_FUNCTION_PTR_IS_SPECIAL
|
||||||
#define DL_UNMAP_IS_SPECIAL
|
#define DL_UNMAP_IS_SPECIAL
|
||||||
|
|
||||||
void *_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref);
|
extern void *_dl_symbol_address (const struct link_map *map,
|
||||||
|
const Elf64_Sym *ref);
|
||||||
|
|
||||||
#define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref)
|
#define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref)
|
||||||
|
|
||||||
Elf64_Addr _dl_lookup_address (const void *address);
|
extern Elf64_Addr _dl_lookup_address (const void *address);
|
||||||
|
|
||||||
#define DL_LOOKUP_ADDRESS(addr) _dl_lookup_address (addr)
|
#define DL_LOOKUP_ADDRESS(addr) _dl_lookup_address (addr)
|
||||||
|
|
||||||
void _dl_unmap (struct link_map *map);
|
extern void _dl_unmap (struct link_map *map);
|
||||||
|
|
||||||
#define DL_UNMAP(map) _dl_unmap (map)
|
#define DL_UNMAP(map) _dl_unmap (map)
|
||||||
|
|
||||||
|
extern Elf64_Addr _dl_function_address (const struct link_map *map,
|
||||||
|
Elf64_Addr start);
|
||||||
|
|
||||||
|
#define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr)
|
||||||
|
#define DL_DT_INIT_ADDRESS(map, addr) DL_FUNCTION_ADDRESS (map, addr)
|
||||||
|
#define DL_DT_FINI_ADDRESS(map, addr) DL_FUNCTION_ADDRESS (map, addr)
|
||||||
|
@ -424,14 +424,11 @@ _dl_start_user:
|
|||||||
#define ELF_MACHINE_NO_REL 1
|
#define ELF_MACHINE_NO_REL 1
|
||||||
|
|
||||||
/* Return the address of the entry point. */
|
/* Return the address of the entry point. */
|
||||||
extern ElfW(Addr) _dl_start_address (const struct link_map *map,
|
|
||||||
ElfW(Addr) start);
|
|
||||||
|
|
||||||
#define ELF_MACHINE_START_ADDRESS(map, start) \
|
#define ELF_MACHINE_START_ADDRESS(map, start) \
|
||||||
_dl_start_address ((map), (start))
|
DL_FUNCTION_ADDRESS (map, start)
|
||||||
|
|
||||||
#define elf_machine_profile_fixup_plt(l, reloc, rel_addr, value) \
|
#define elf_machine_profile_fixup_plt(l, reloc, rel_addr, value) \
|
||||||
elf_machine_fixup_plt ((l), (reloc), (rel_addr), (value))
|
elf_machine_fixup_plt (l, reloc, rel_addr, value)
|
||||||
|
|
||||||
#define elf_machine_profile_plt(reloc_addr) ((Elf64_Addr) (reloc_addr))
|
#define elf_machine_profile_plt(reloc_addr) ((Elf64_Addr) (reloc_addr))
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <dl-machine.h>
|
#include <dl-machine.h>
|
||||||
|
|
||||||
void *
|
void *
|
||||||
_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref)
|
_dl_symbol_address (const struct link_map *map, const Elf64_Sym *ref)
|
||||||
{
|
{
|
||||||
Elf64_Addr value = (map ? map->l_addr : 0) + ref->st_value;
|
Elf64_Addr value = (map ? map->l_addr : 0) + ref->st_value;
|
||||||
|
|
||||||
@ -32,8 +32,8 @@ _dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref)
|
|||||||
return (void *) value;
|
return (void *) value;
|
||||||
}
|
}
|
||||||
|
|
||||||
ElfW(Addr)
|
Elf64_Addr
|
||||||
_dl_start_address (const struct link_map *map, ElfW(Addr) start)
|
_dl_function_address (const struct link_map *map, Elf64_Addr start)
|
||||||
{
|
{
|
||||||
return __ia64_make_fptr (map, start, &__fptr_root, NULL);
|
return __ia64_make_fptr (map, start, &__fptr_root, NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user