1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/uClibc/0.9.30.1/170-dl-sysdep-inline.patch Sun Jan 30 19:31:51 2011 +0100
1.3 @@ -0,0 +1,371 @@
1.4 +Index: uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h
1.5 +===================================================================
1.6 +--- uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h (revision 25503)
1.7 ++++ uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h (working copy)
1.8 +@@ -17,7 +17,7 @@
1.9 +
1.10 + #define DL_MALLOC_ALIGN 8 /* EABI needs 8 byte alignment for STRD LDRD*/
1.11 +
1.12 +-static __inline__ unsigned long arm_modulus(unsigned long m, unsigned long p)
1.13 ++static __always_inline unsigned long arm_modulus(unsigned long m, unsigned long p)
1.14 + {
1.15 + unsigned long i,t,inc;
1.16 + i=p; t=0;
1.17 +@@ -74,7 +74,7 @@ unsigned long _dl_linux_resolver(struct
1.18 + first element of the GOT. We used to use the PIC register to do this
1.19 + without a constant pool reference, but GCC 4.2 will use a pseudo-register
1.20 + for the PIC base, so it may not be in r10. */
1.21 +-static __inline__ Elf32_Addr __attribute__ ((unused))
1.22 ++static __always_inline Elf32_Addr __attribute__ ((unused))
1.23 + elf_machine_dynamic (void)
1.24 + {
1.25 + Elf32_Addr dynamic;
1.26 +@@ -106,7 +106,7 @@ elf_machine_dynamic (void)
1.27 + }
1.28 +
1.29 + /* Return the run-time load address of the shared object. */
1.30 +-static __inline__ Elf32_Addr __attribute__ ((unused))
1.31 ++static __always_inline Elf32_Addr __attribute__ ((unused))
1.32 + elf_machine_load_address (void)
1.33 + {
1.34 + extern void __dl_start __asm__ ("_dl_start");
1.35 +@@ -130,7 +130,7 @@ elf_machine_load_address (void)
1.36 + return pcrel_addr - got_addr;
1.37 + }
1.38 +
1.39 +-static __inline__ void
1.40 ++static __always_inline void
1.41 + elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.42 + Elf32_Word relative_count)
1.43 + {
1.44 +Index: uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h
1.45 +===================================================================
1.46 +--- uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h (revision 25503)
1.47 ++++ uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h (working copy)
1.48 +@@ -90,7 +90,7 @@ void _dl_init_got(unsigned long *lpnt,st
1.49 + #define ELF_MACHINE_PLTREL_OVERLAP 1
1.50 +
1.51 + /* Return the value of the GOT pointer. */
1.52 +-static __inline__ Elf32_Addr * __attribute__ ((const))
1.53 ++static __always_inline Elf32_Addr * __attribute__ ((const))
1.54 + ppc_got (void)
1.55 + {
1.56 + Elf32_Addr *got;
1.57 +@@ -109,14 +109,14 @@ ppc_got (void)
1.58 +
1.59 + /* Return the link-time address of _DYNAMIC, stored as
1.60 + the first value in the GOT. */
1.61 +-static __inline__ Elf32_Addr __attribute__ ((const))
1.62 ++static __always_inline Elf32_Addr __attribute__ ((const))
1.63 + elf_machine_dynamic (void)
1.64 + {
1.65 + return *ppc_got();
1.66 + }
1.67 +
1.68 + /* Return the run-time load address of the shared object. */
1.69 +-static __inline__ Elf32_Addr __attribute__ ((const))
1.70 ++static __always_inline Elf32_Addr __attribute__ ((const))
1.71 + elf_machine_load_address (void)
1.72 + {
1.73 + Elf32_Addr *branchaddr;
1.74 +@@ -164,7 +164,7 @@ elf_machine_load_address (void)
1.75 + return runtime_dynamic - elf_machine_dynamic ();
1.76 + }
1.77 +
1.78 +-static __inline__ void
1.79 ++static __always_inline void
1.80 + elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.81 + Elf32_Word relative_count)
1.82 + {
1.83 +Index: uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h
1.84 +===================================================================
1.85 +--- uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h (revision 25503)
1.86 ++++ uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h (working copy)
1.87 +@@ -42,7 +42,7 @@ extern unsigned long _dl_linux_resolver(
1.88 + /* Return the link-time address of _DYNAMIC. Conveniently, this is the
1.89 + first element of the GOT. This must be inlined in a function which
1.90 + uses global data. */
1.91 +-static __inline__ Elf32_Addr elf_machine_dynamic(void)
1.92 ++static __always_inline Elf32_Addr elf_machine_dynamic(void)
1.93 + {
1.94 + register Elf32_Addr *got;
1.95 +
1.96 +@@ -70,7 +70,7 @@ static __inline__ Elf32_Addr elf_machine
1.97 + }
1.98 +
1.99 + /* Return the run-time load address of the shared object. */
1.100 +-static __inline__ Elf32_Addr elf_machine_load_address(void)
1.101 ++static __always_inline Elf32_Addr elf_machine_load_address(void)
1.102 + {
1.103 + Elf32_Addr addr;
1.104 +
1.105 +@@ -123,7 +123,7 @@ static __inline__ Elf32_Addr elf_machine
1.106 + } \
1.107 + }
1.108 +
1.109 +-static __inline__ void
1.110 ++static __always_inline void
1.111 + elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.112 + Elf32_Word relative_count)
1.113 + {
1.114 +Index: uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h
1.115 +===================================================================
1.116 +--- uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h (revision 25503)
1.117 ++++ uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h (working copy)
1.118 +@@ -41,7 +41,7 @@ extern unsigned long _dl_linux_resolver
1.119 + /* Return the link-time address of _DYNAMIC. Conveniently, this is the
1.120 + first element of the GOT. This must be inlined in a function which
1.121 + uses global data. */
1.122 +-static __inline__ Elf32_Addr
1.123 ++static __always_inline Elf32_Addr
1.124 + elf_machine_dynamic (void)
1.125 + {
1.126 + register Elf32_Addr *got __asm__ ("%a5");
1.127 +@@ -50,7 +50,7 @@ elf_machine_dynamic (void)
1.128 +
1.129 +
1.130 + /* Return the run-time load address of the shared object. */
1.131 +-static __inline__ Elf32_Addr
1.132 ++static __always_inline Elf32_Addr
1.133 + elf_machine_load_address (void)
1.134 + {
1.135 + Elf32_Addr addr;
1.136 +@@ -60,7 +60,7 @@ elf_machine_load_address (void)
1.137 + return addr;
1.138 + }
1.139 +
1.140 +-static __inline__ void
1.141 ++static __always_inline void
1.142 + elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.143 + Elf32_Word relative_count)
1.144 + {
1.145 +Index: uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h
1.146 +===================================================================
1.147 +--- uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h (revision 25503)
1.148 ++++ uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h (working copy)
1.149 +@@ -42,8 +42,8 @@ extern unsigned long _dl_linux_resolver(
1.150 + /* Return the link-time address of _DYNAMIC. Conveniently, this is the
1.151 + first element of the GOT. This must be inlined in a function which
1.152 + uses global data. */
1.153 +-static __inline__ Elf32_Addr elf_machine_dynamic (void) attribute_unused;
1.154 +-static __inline__ Elf32_Addr
1.155 ++static __always_inline Elf32_Addr elf_machine_dynamic (void) attribute_unused;
1.156 ++static __always_inline Elf32_Addr
1.157 + elf_machine_dynamic (void)
1.158 + {
1.159 + register Elf32_Addr *got __asm__ ("%ebx");
1.160 +@@ -52,8 +52,8 @@ elf_machine_dynamic (void)
1.161 +
1.162 +
1.163 + /* Return the run-time load address of the shared object. */
1.164 +-static __inline__ Elf32_Addr elf_machine_load_address (void) attribute_unused;
1.165 +-static __inline__ Elf32_Addr
1.166 ++static __always_inline Elf32_Addr elf_machine_load_address (void) attribute_unused;
1.167 ++static __always_inline Elf32_Addr
1.168 + elf_machine_load_address (void)
1.169 + {
1.170 + /* It doesn't matter what variable this is, the reference never makes
1.171 +@@ -66,7 +66,7 @@ elf_machine_load_address (void)
1.172 + return addr;
1.173 + }
1.174 +
1.175 +-static __inline__ void
1.176 ++static __always_inline void
1.177 + elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.178 + Elf32_Word relative_count)
1.179 + {
1.180 +Index: uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h
1.181 +===================================================================
1.182 +--- uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h (revision 25503)
1.183 ++++ uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h (working copy)
1.184 +@@ -39,7 +39,7 @@ extern unsigned long _dl_linux_resolver(
1.185 + || ((type) == R_CRIS_GLOB_DAT)) * ELF_RTYPE_CLASS_PLT) \
1.186 + | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY))
1.187 +
1.188 +-static __inline__ Elf32_Addr
1.189 ++static __always_inline Elf32_Addr
1.190 + elf_machine_dynamic(void)
1.191 + {
1.192 + /* Don't just set this to an asm variable "r0" since that's not logical
1.193 +@@ -61,7 +61,7 @@ elf_machine_dynamic(void)
1.194 + there's some other symbol we could use, that we don't *have* to force a
1.195 + GOT entry for. */
1.196 +
1.197 +-static __inline__ Elf32_Addr
1.198 ++static __always_inline Elf32_Addr
1.199 + elf_machine_load_address(void)
1.200 + {
1.201 + Elf32_Addr gotaddr_diff;
1.202 +@@ -95,7 +95,7 @@ elf_machine_load_address(void)
1.203 + return gotaddr_diff;
1.204 + }
1.205 +
1.206 +-static __inline__ void
1.207 ++static __always_inline void
1.208 + elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.209 + Elf32_Word relative_count)
1.210 + {
1.211 +Index: uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h
1.212 +===================================================================
1.213 +--- uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h (revision 25503)
1.214 ++++ uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h (working copy)
1.215 +@@ -87,7 +87,7 @@ extern unsigned long _dl_linux_resolver
1.216 + (((type) == R_XTENSA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
1.217 +
1.218 + /* Return the link-time address of _DYNAMIC. */
1.219 +-static __inline__ Elf32_Addr
1.220 ++static __always_inline Elf32_Addr
1.221 + elf_machine_dynamic (void)
1.222 + {
1.223 + /* This function is only used while bootstrapping the runtime linker.
1.224 +@@ -97,7 +97,7 @@ elf_machine_dynamic (void)
1.225 + }
1.226 +
1.227 + /* Return the run-time load address of the shared object. */
1.228 +-static __inline__ Elf32_Addr
1.229 ++static __always_inline Elf32_Addr
1.230 + elf_machine_load_address (void)
1.231 + {
1.232 + Elf32_Addr addr, tmp;
1.233 +@@ -118,7 +118,7 @@ elf_machine_load_address (void)
1.234 + return addr - 3;
1.235 + }
1.236 +
1.237 +-static __inline__ void
1.238 ++static __always_inline void
1.239 + elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.240 + Elf32_Word relative_count)
1.241 + {
1.242 +Index: uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h
1.243 +===================================================================
1.244 +--- uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h (revision 25503)
1.245 ++++ uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h (working copy)
1.246 +@@ -49,7 +49,7 @@ unsigned long _dl_linux_resolver(struct
1.247 +
1.248 + #ifndef COMPILE_ASM
1.249 + /* Cheap modulo implementation, taken from arm/ld_sysdep.h. */
1.250 +-static __inline__ unsigned long
1.251 ++static __always_inline unsigned long
1.252 + sparc_mod(unsigned long m, unsigned long p)
1.253 + {
1.254 + unsigned long i, t, inc;
1.255 +@@ -127,7 +127,7 @@ do { register Elf32_Addr pc __asm__("
1.256 + /* Return the link-time address of _DYNAMIC. Conveniently, this is the
1.257 + first element of the GOT. This must be inlined in a function which
1.258 + uses global data. */
1.259 +-static __inline__ Elf32_Addr
1.260 ++static __always_inline Elf32_Addr
1.261 + elf_machine_dynamic (void)
1.262 + {
1.263 + register Elf32_Addr *got __asm__ ("%l7");
1.264 +@@ -138,7 +138,7 @@ elf_machine_dynamic (void)
1.265 + }
1.266 +
1.267 + /* Return the run-time load address of the shared object. */
1.268 +-static __inline__ Elf32_Addr
1.269 ++static __always_inline Elf32_Addr
1.270 + elf_machine_load_address (void)
1.271 + {
1.272 + register Elf32_Addr *pc __asm__ ("%o7"), *got __asm__ ("%l7");
1.273 +@@ -157,7 +157,7 @@ elf_machine_load_address (void)
1.274 + return (Elf32_Addr) got - *got + (pc[2] - pc[3]) * 4 - 4;
1.275 + }
1.276 +
1.277 +-static __inline__ void
1.278 ++static __always_inline void
1.279 + elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.280 + Elf32_Word relative_count)
1.281 + {
1.282 +Index: uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h
1.283 +===================================================================
1.284 +--- uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h (revision 25503)
1.285 ++++ uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h (working copy)
1.286 +@@ -163,7 +163,7 @@ void _dl_perform_mips_global_got_relocat
1.287 +
1.288 + #define OFFSET_GP_GOT 0x7ff0
1.289 +
1.290 +-static __inline__ ElfW(Addr) *
1.291 ++static __always_inline ElfW(Addr) *
1.292 + elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
1.293 + {
1.294 + /* FIXME: the offset of gp from GOT may be system-dependent. */
1.295 +@@ -173,7 +173,7 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpre
1.296 + /* Return the link-time address of _DYNAMIC. Conveniently, this is the
1.297 + first element of the GOT. This must be inlined in a function which
1.298 + uses global data. We assume its $gp points to the primary GOT. */
1.299 +-static __inline__ ElfW(Addr)
1.300 ++static __always_inline ElfW(Addr)
1.301 + elf_machine_dynamic (void)
1.302 + {
1.303 + register ElfW(Addr) gp __asm__ ("$28");
1.304 +@@ -192,7 +192,7 @@ elf_machine_dynamic (void)
1.305 + #endif
1.306 +
1.307 + /* Return the run-time load address of the shared object. */
1.308 +-static __inline__ ElfW(Addr)
1.309 ++static __always_inline ElfW(Addr)
1.310 + elf_machine_load_address (void)
1.311 + {
1.312 + ElfW(Addr) addr;
1.313 +@@ -208,7 +208,7 @@ elf_machine_load_address (void)
1.314 + return addr;
1.315 + }
1.316 +
1.317 +-static __inline__ void
1.318 ++static __always_inline void
1.319 + elf_machine_relative (ElfW(Addr) load_off, const ElfW(Addr) rel_addr,
1.320 + ElfW(Word) relative_count)
1.321 + {
1.322 +Index: uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h
1.323 +===================================================================
1.324 +--- uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h (revision 25503)
1.325 ++++ uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h (working copy)
1.326 +@@ -25,7 +25,7 @@
1.327 + struct elf_resolve;
1.328 + extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
1.329 +
1.330 +-static __inline__ unsigned int
1.331 ++static __always_inline unsigned int
1.332 + _dl_urem(unsigned int n, unsigned int base)
1.333 + {
1.334 + int res;
1.335 +@@ -100,7 +100,7 @@ _dl_urem(unsigned int n, unsigned int ba
1.336 + /* Return the link-time address of _DYNAMIC. Conveniently, this is the
1.337 + first element of the GOT. This must be inlined in a function which
1.338 + uses global data. */
1.339 +-static __inline__ Elf32_Addr __attribute__ ((unused))
1.340 ++static __always_inline Elf32_Addr __attribute__ ((unused))
1.341 + elf_machine_dynamic (void)
1.342 + {
1.343 + register Elf32_Addr *got;
1.344 +@@ -109,7 +109,7 @@ elf_machine_dynamic (void)
1.345 + }
1.346 +
1.347 + /* Return the run-time load address of the shared object. */
1.348 +-static __inline__ Elf32_Addr __attribute__ ((unused))
1.349 ++static __always_inline Elf32_Addr __attribute__ ((unused))
1.350 + elf_machine_load_address (void)
1.351 + {
1.352 + Elf32_Addr addr;
1.353 +@@ -151,7 +151,7 @@ elf_machine_load_address (void)
1.354 + } \
1.355 + }
1.356 +
1.357 +-static __inline__ void
1.358 ++static __always_inline void
1.359 + elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
1.360 + Elf32_Word relative_count)
1.361 + {
1.362 +Index: uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h
1.363 +===================================================================
1.364 +--- uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h (revision 25503)
1.365 ++++ uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h (working copy)
1.366 +@@ -213,7 +213,7 @@ while (0)
1.367 + #endif
1.368 +
1.369 + #include <elf.h>
1.370 +-static __inline__ void
1.371 ++static __always_inline void
1.372 + elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
1.373 + Elf32_Word relative_count)
1.374 + {