This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Kill inlining failed warnings on ia64 and ppc64


Hi!

These routines are good candidates for inlining, so help
GCC a little.  Perhaps we should have different macros like:
__must_inline__
and
__should_inline__
(both ATM defined to __attribute__ ((always_inline)), but at
least would document if the code will not run at all if it is
not inlined or if it will run, but inline alone is not enough
to convince the compiler).

2004-08-06  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Add
	always_inline.
	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_runtime_setup,
	elf_machine_fixup_plt, elf_machine_plt_conflict): Likewise.

--- libc/sysdeps/ia64/dl-machine.h	10 Mar 2004 22:10:11 -0000	1.1.1.29
+++ libc/sysdeps/ia64/dl-machine.h	6 Aug 2004 12:51:44 -0000	1.26
@@ -460,7 +460,7 @@ elf_machine_runtime_setup (struct link_m
 #define elf_machine_profile_plt(reloc_addr) ((Elf64_Addr) (reloc_addr))
 
 /* Fixup a PLT entry to bounce directly to the function at VALUE.  */
-static inline Elf64_Addr
+static inline Elf64_Addr __attribute__ ((always_inline))
 elf_machine_fixup_plt (struct link_map *l, lookup_t t,
 		       const Elf64_Rela *reloc,
 		       Elf64_Addr *reloc_addr, Elf64_Addr value)
--- libc/sysdeps/powerpc/powerpc64/dl-machine.h	16 Jul 2004 08:43:48 -0000	1.1.1.13
+++ libc/sysdeps/powerpc/powerpc64/dl-machine.h	6 Aug 2004 12:51:44 -0000	1.14
@@ -384,7 +384,7 @@ DL_STARTING_UP_DEF							\
 
 /* Set up the loaded object described by MAP so its unrelocated PLT
    entries will jump to the on-demand fixup code in dl-runtime.c.  */
-static inline int
+static inline int __attribute__ ((always_inline))
 elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
 {
   if (map->l_info[DT_JMPREL])
@@ -481,7 +481,7 @@ elf_machine_runtime_setup (struct link_m
 
 /* Change the PLT entry whose reloc is 'reloc' to call the actual
    routine.  */
-static inline Elf64_Addr
+static inline Elf64_Addr __attribute__ ((always_inline))
 elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
 		       const Elf64_Rela *reloc,
 		       Elf64_Addr *reloc_addr, Elf64_Addr finaladdr)
@@ -523,7 +523,7 @@ elf_machine_fixup_plt (struct link_map *
   return finaladdr;
 }
 
-static inline void
+static inline void __attribute__ ((always_inline))
 elf_machine_plt_conflict (Elf64_Addr *reloc_addr, Elf64_Addr finaladdr)
 {
   Elf64_FuncDesc *plt = (Elf64_FuncDesc *) reloc_addr;

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]