Skip to content

Commit

Permalink
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Define
Browse files Browse the repository at this point in the history
	with auto inline, and attribute always_inline.
	(elf_machine_rela_relative, elf_machine_lazy_rel): Likewise.
	(elf_machine_rel, elf_machine_rel_relative): Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise.
	(elf_machine_rela_relative, elf_machine_lazy_rel): Likewise.
	(elf_machine_rel, elf_machine_rel_relative): Likewise.
	(elf_machine_tprel): Likewise.
  • Loading branch information
Roland McGrath committed Feb 14, 2005
1 parent c56f532 commit 7de0012
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 8 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2005-02-14 Alan Modra <amodra@bigpond.net.au>

* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Define
with auto inline, and attribute always_inline.
(elf_machine_rela_relative, elf_machine_lazy_rel): Likewise.
(elf_machine_rel, elf_machine_rel_relative): Likewise.
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise.
(elf_machine_rela_relative, elf_machine_lazy_rel): Likewise.
(elf_machine_rel, elf_machine_rel_relative): Likewise.
(elf_machine_tprel): Likewise.

2005-02-14 Andreas Schwab <schwab@suse.de>

* manual/filesys.texi (Random Access Directory): Fix type of file
Expand Down
5 changes: 5 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2005-02-14 Alan Modra <amodra@bigpond.net.au>

* sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
gcc4.

2005-02-07 Richard Henderson <rth@redhat.com>

* sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
Expand Down
3 changes: 2 additions & 1 deletion nptl/sysdeps/powerpc/tcb-offsets.sym
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
-- Abuse tls.h macros to derive offsets relative to the thread register.
# undef __thread_register
# define __thread_register ((void *) 0)
# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
# define thread_offsetof(mem) ((ptrdiff_t) THREAD_SELF + offsetof (struct pthread, mem))


#if TLS_MULTIPLE_THREADS_IN_TCB
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
Expand Down
19 changes: 16 additions & 3 deletions sysdeps/powerpc/powerpc32/dl-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ extern void _dl_reloc_overflow (struct link_map *map,
LOADADDR is the load address of the object; INFO is an array indexed
by DT_* of the .dynamic section info. */

inline void
auto inline void __attribute__ ((always_inline))
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
void *const reloc_addr_arg)
Expand Down Expand Up @@ -298,21 +298,34 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
}

static inline void
auto inline void __attribute__ ((always_inline))
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
void *const reloc_addr_arg)
{
Elf32_Addr *const reloc_addr = reloc_addr_arg;
*reloc_addr = l_addr + reloc->r_addend;
}

static inline void
auto inline void __attribute__ ((always_inline))
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
/* elf_machine_runtime_setup handles this. */
}

auto inline void __attribute__ ((always_inline))
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
void *const reloc_addr)
{
}

auto inline void __attribute__ ((always_inline))
elf_machine_rel_relative (ElfW(Addr) l_addr, const Elf32_Rel *reloc,
void *const reloc_addr)
{
}

/* The SVR4 ABI specifies that the JMPREL relocs must be inside the
DT_RELA table. */
#define ELF_MACHINE_PLTREL_OVERLAP 1
Expand Down
21 changes: 17 additions & 4 deletions sysdeps/powerpc/powerpc64/dl-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ extern void _dl_reloc_overflow (struct link_map *map,
const Elf64_Sym *refsym)
attribute_hidden;

static inline void
auto inline void __attribute__ ((always_inline))
elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
void *const reloc_addr_arg)
{
Expand All @@ -497,7 +497,7 @@ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,

#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
/* This computes the value used by TPREL* relocs. */
static Elf64_Addr __attribute__ ((const))
auto inline Elf64_Addr __attribute__ ((always_inline, const))
elf_machine_tprel (struct link_map *map,
struct link_map *sym_map,
const Elf64_Sym *sym,
Expand All @@ -518,7 +518,7 @@ elf_machine_tprel (struct link_map *map,

/* Perform the relocation specified by RELOC and SYM (which is fully
resolved). MAP is the object containing the reloc. */
static inline void
auto inline void __attribute__ ((always_inline))
elf_machine_rela (struct link_map *map,
const Elf64_Rela *reloc,
const Elf64_Sym *sym,
Expand Down Expand Up @@ -803,11 +803,24 @@ elf_machine_rela (struct link_map *map,
MODIFIED_CODE_NOQUEUE (reloc_addr);
}

static inline void
auto inline void __attribute__ ((always_inline))
elf_machine_lazy_rel (struct link_map *map,
Elf64_Addr l_addr, const Elf64_Rela *reloc)
{
/* elf_machine_runtime_setup handles this. */
}

auto inline void __attribute__ ((always_inline))
elf_machine_rel (struct link_map *map, const Elf64_Rel *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
void *const reloc_addr)
{
}

auto inline void __attribute__ ((always_inline))
elf_machine_rel_relative (ElfW(Addr) l_addr, const Elf64_Rel *reloc,
void *const reloc_addr)
{
}

#endif /* RESOLVE */

0 comments on commit 7de0012

Please sign in to comment.