always_inline.patch 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/arm/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h
  2. --- uClibc-0.9.30.1.orig/ldso/ldso/arm/dl-sysdep.h 2008-09-25 10:35:20.000000000 +0200
  3. +++ uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h 2009-06-18 16:37:16.000000000 +0200
  4. @@ -15,7 +15,7 @@
  5. GOT_BASE[1] = (unsigned long) MODULE; \
  6. }
  7. -static __inline__ unsigned long arm_modulus(unsigned long m, unsigned long p)
  8. +static __always_inline unsigned long arm_modulus(unsigned long m, unsigned long p)
  9. {
  10. unsigned long i,t,inc;
  11. i=p; t=0;
  12. @@ -72,7 +72,7 @@
  13. first element of the GOT. We used to use the PIC register to do this
  14. without a constant pool reference, but GCC 4.2 will use a pseudo-register
  15. for the PIC base, so it may not be in r10. */
  16. -static __inline__ Elf32_Addr __attribute__ ((unused))
  17. +static __always_inline Elf32_Addr __attribute__ ((unused))
  18. elf_machine_dynamic (void)
  19. {
  20. Elf32_Addr dynamic;
  21. @@ -104,7 +104,7 @@
  22. }
  23. /* Return the run-time load address of the shared object. */
  24. -static __inline__ Elf32_Addr __attribute__ ((unused))
  25. +static __always_inline Elf32_Addr __attribute__ ((unused))
  26. elf_machine_load_address (void)
  27. {
  28. extern void __dl_start __asm__ ("_dl_start");
  29. @@ -128,7 +128,7 @@
  30. return pcrel_addr - got_addr;
  31. }
  32. -static __inline__ void
  33. +static __always_inline void
  34. elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
  35. Elf32_Word relative_count)
  36. {
  37. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/bfin/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h
  38. --- uClibc-0.9.30.1.orig/ldso/ldso/bfin/dl-sysdep.h 2008-07-23 13:23:36.000000000 +0200
  39. +++ uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h 2009-06-18 16:37:37.000000000 +0200
  40. @@ -213,7 +213,7 @@
  41. #endif
  42. #include <elf.h>
  43. -static __inline__ void
  44. +static __always_inline void
  45. elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
  46. Elf32_Word relative_count)
  47. {
  48. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/cris/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h
  49. --- uClibc-0.9.30.1.orig/ldso/ldso/cris/dl-sysdep.h 2008-07-23 13:19:00.000000000 +0200
  50. +++ uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h 2009-06-18 16:37:42.000000000 +0200
  51. @@ -39,7 +39,7 @@
  52. || ((type) == R_CRIS_GLOB_DAT)) * ELF_RTYPE_CLASS_PLT) \
  53. | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY))
  54. -static __inline__ Elf32_Addr
  55. +static __always_inline Elf32_Addr
  56. elf_machine_dynamic(void)
  57. {
  58. /* Don't just set this to an asm variable "r0" since that's not logical
  59. @@ -61,7 +61,7 @@
  60. there's some other symbol we could use, that we don't *have* to force a
  61. GOT entry for. */
  62. -static __inline__ Elf32_Addr
  63. +static __always_inline Elf32_Addr
  64. elf_machine_load_address(void)
  65. {
  66. Elf32_Addr gotaddr_diff;
  67. @@ -95,7 +95,7 @@
  68. return gotaddr_diff;
  69. }
  70. -static __inline__ void
  71. +static __always_inline void
  72. elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
  73. Elf32_Word relative_count)
  74. {
  75. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/i386/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h
  76. --- uClibc-0.9.30.1.orig/ldso/ldso/i386/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
  77. +++ uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h 2009-06-18 16:37:53.000000000 +0200
  78. @@ -42,8 +42,8 @@
  79. /* Return the link-time address of _DYNAMIC. Conveniently, this is the
  80. first element of the GOT. This must be inlined in a function which
  81. uses global data. */
  82. -static __inline__ Elf32_Addr elf_machine_dynamic (void) attribute_unused;
  83. -static __inline__ Elf32_Addr
  84. +static __always_inline Elf32_Addr elf_machine_dynamic (void) attribute_unused;
  85. +static __always_inline Elf32_Addr
  86. elf_machine_dynamic (void)
  87. {
  88. register Elf32_Addr *got __asm__ ("%ebx");
  89. @@ -52,8 +52,8 @@
  90. /* Return the run-time load address of the shared object. */
  91. -static __inline__ Elf32_Addr elf_machine_load_address (void) attribute_unused;
  92. -static __inline__ Elf32_Addr
  93. +static __always_inline Elf32_Addr elf_machine_load_address (void) attribute_unused;
  94. +static __always_inline Elf32_Addr
  95. elf_machine_load_address (void)
  96. {
  97. /* It doesn't matter what variable this is, the reference never makes
  98. @@ -66,7 +66,7 @@
  99. return addr;
  100. }
  101. -static __inline__ void
  102. +static __always_inline void
  103. elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
  104. Elf32_Word relative_count)
  105. {
  106. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/m68k/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h
  107. --- uClibc-0.9.30.1.orig/ldso/ldso/m68k/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
  108. +++ uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h 2009-06-18 16:37:58.000000000 +0200
  109. @@ -41,7 +41,7 @@
  110. /* Return the link-time address of _DYNAMIC. Conveniently, this is the
  111. first element of the GOT. This must be inlined in a function which
  112. uses global data. */
  113. -static __inline__ Elf32_Addr
  114. +static __always_inline Elf32_Addr
  115. elf_machine_dynamic (void)
  116. {
  117. register Elf32_Addr *got __asm__ ("%a5");
  118. @@ -50,7 +50,7 @@
  119. /* Return the run-time load address of the shared object. */
  120. -static __inline__ Elf32_Addr
  121. +static __always_inline Elf32_Addr
  122. elf_machine_load_address (void)
  123. {
  124. Elf32_Addr addr;
  125. @@ -60,7 +60,7 @@
  126. return addr;
  127. }
  128. -static __inline__ void
  129. +static __always_inline void
  130. elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
  131. Elf32_Word relative_count)
  132. {
  133. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h
  134. --- uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
  135. +++ uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h 2009-06-18 16:38:03.000000000 +0200
  136. @@ -163,7 +163,7 @@
  137. #define OFFSET_GP_GOT 0x7ff0
  138. -static __inline__ ElfW(Addr) *
  139. +static __always_inline ElfW(Addr) *
  140. elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
  141. {
  142. /* FIXME: the offset of gp from GOT may be system-dependent. */
  143. @@ -173,7 +173,7 @@
  144. /* Return the link-time address of _DYNAMIC. Conveniently, this is the
  145. first element of the GOT. This must be inlined in a function which
  146. uses global data. We assume its $gp points to the primary GOT. */
  147. -static __inline__ ElfW(Addr)
  148. +static __always_inline ElfW(Addr)
  149. elf_machine_dynamic (void)
  150. {
  151. register ElfW(Addr) gp __asm__ ("$28");
  152. @@ -192,7 +192,7 @@
  153. #endif
  154. /* Return the run-time load address of the shared object. */
  155. -static __inline__ ElfW(Addr)
  156. +static __always_inline ElfW(Addr)
  157. elf_machine_load_address (void)
  158. {
  159. ElfW(Addr) addr;
  160. @@ -208,7 +208,7 @@
  161. return addr;
  162. }
  163. -static __inline__ void
  164. +static __always_inline void
  165. elf_machine_relative (ElfW(Addr) load_off, const ElfW(Addr) rel_addr,
  166. ElfW(Word) relative_count)
  167. {
  168. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/powerpc/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h
  169. --- uClibc-0.9.30.1.orig/ldso/ldso/powerpc/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
  170. +++ uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h 2009-06-18 16:38:09.000000000 +0200
  171. @@ -90,7 +90,7 @@
  172. #define ELF_MACHINE_PLTREL_OVERLAP 1
  173. /* Return the value of the GOT pointer. */
  174. -static __inline__ Elf32_Addr * __attribute__ ((const))
  175. +static __always_inline Elf32_Addr * __attribute__ ((const))
  176. ppc_got (void)
  177. {
  178. Elf32_Addr *got;
  179. @@ -109,14 +109,14 @@
  180. /* Return the link-time address of _DYNAMIC, stored as
  181. the first value in the GOT. */
  182. -static __inline__ Elf32_Addr __attribute__ ((const))
  183. +static __always_inline Elf32_Addr __attribute__ ((const))
  184. elf_machine_dynamic (void)
  185. {
  186. return *ppc_got();
  187. }
  188. /* Return the run-time load address of the shared object. */
  189. -static __inline__ Elf32_Addr __attribute__ ((const))
  190. +static __always_inline Elf32_Addr __attribute__ ((const))
  191. elf_machine_load_address (void)
  192. {
  193. Elf32_Addr *branchaddr;
  194. @@ -164,7 +164,7 @@
  195. return runtime_dynamic - elf_machine_dynamic ();
  196. }
  197. -static __inline__ void
  198. +static __always_inline void
  199. elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
  200. Elf32_Word relative_count)
  201. {
  202. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sh/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h
  203. --- uClibc-0.9.30.1.orig/ldso/ldso/sh/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
  204. +++ uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h 2009-06-18 16:38:18.000000000 +0200
  205. @@ -25,7 +25,7 @@
  206. struct elf_resolve;
  207. extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
  208. -static __inline__ unsigned int
  209. +static __always_inline unsigned int
  210. _dl_urem(unsigned int n, unsigned int base)
  211. {
  212. int res;
  213. @@ -100,7 +100,7 @@
  214. /* Return the link-time address of _DYNAMIC. Conveniently, this is the
  215. first element of the GOT. This must be inlined in a function which
  216. uses global data. */
  217. -static __inline__ Elf32_Addr __attribute__ ((unused))
  218. +static __always_inline Elf32_Addr __attribute__ ((unused))
  219. elf_machine_dynamic (void)
  220. {
  221. register Elf32_Addr *got;
  222. @@ -109,7 +109,7 @@
  223. }
  224. /* Return the run-time load address of the shared object. */
  225. -static __inline__ Elf32_Addr __attribute__ ((unused))
  226. +static __always_inline Elf32_Addr __attribute__ ((unused))
  227. elf_machine_load_address (void)
  228. {
  229. Elf32_Addr addr;
  230. @@ -151,7 +151,7 @@
  231. } \
  232. }
  233. -static __inline__ void
  234. +static __always_inline void
  235. elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
  236. Elf32_Word relative_count)
  237. {
  238. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sh64/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h
  239. --- uClibc-0.9.30.1.orig/ldso/ldso/sh64/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
  240. +++ uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h 2009-06-18 16:38:14.000000000 +0200
  241. @@ -42,7 +42,7 @@
  242. /* Return the link-time address of _DYNAMIC. Conveniently, this is the
  243. first element of the GOT. This must be inlined in a function which
  244. uses global data. */
  245. -static __inline__ Elf32_Addr elf_machine_dynamic(void)
  246. +static __always_inline Elf32_Addr elf_machine_dynamic(void)
  247. {
  248. register Elf32_Addr *got;
  249. @@ -70,7 +70,7 @@
  250. }
  251. /* Return the run-time load address of the shared object. */
  252. -static __inline__ Elf32_Addr elf_machine_load_address(void)
  253. +static __always_inline Elf32_Addr elf_machine_load_address(void)
  254. {
  255. Elf32_Addr addr;
  256. @@ -123,7 +123,7 @@
  257. } \
  258. }
  259. -static __inline__ void
  260. +static __always_inline void
  261. elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
  262. Elf32_Word relative_count)
  263. {
  264. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sparc/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h
  265. --- uClibc-0.9.30.1.orig/ldso/ldso/sparc/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
  266. +++ uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h 2009-06-18 16:38:23.000000000 +0200
  267. @@ -49,7 +49,7 @@
  268. #ifndef COMPILE_ASM
  269. /* Cheap modulo implementation, taken from arm/ld_sysdep.h. */
  270. -static __inline__ unsigned long
  271. +static __always_inline unsigned long
  272. sparc_mod(unsigned long m, unsigned long p)
  273. {
  274. unsigned long i, t, inc;
  275. @@ -127,7 +127,7 @@
  276. /* Return the link-time address of _DYNAMIC. Conveniently, this is the
  277. first element of the GOT. This must be inlined in a function which
  278. uses global data. */
  279. -static __inline__ Elf32_Addr
  280. +static __always_inline Elf32_Addr
  281. elf_machine_dynamic (void)
  282. {
  283. register Elf32_Addr *got __asm__ ("%l7");
  284. @@ -138,7 +138,7 @@
  285. }
  286. /* Return the run-time load address of the shared object. */
  287. -static __inline__ Elf32_Addr
  288. +static __always_inline Elf32_Addr
  289. elf_machine_load_address (void)
  290. {
  291. register Elf32_Addr *pc __asm__ ("%o7"), *got __asm__ ("%l7");
  292. @@ -157,7 +157,7 @@
  293. return (Elf32_Addr) got - *got + (pc[2] - pc[3]) * 4 - 4;
  294. }
  295. -static __inline__ void
  296. +static __always_inline void
  297. elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
  298. Elf32_Word relative_count)
  299. {
  300. diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/xtensa/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h
  301. --- uClibc-0.9.30.1.orig/ldso/ldso/xtensa/dl-sysdep.h 2008-07-23 13:19:00.000000000 +0200
  302. +++ uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h 2009-06-18 16:38:39.000000000 +0200
  303. @@ -87,7 +87,7 @@
  304. (((type) == R_XTENSA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
  305. /* Return the link-time address of _DYNAMIC. */
  306. -static __inline__ Elf32_Addr
  307. +static __always_inline Elf32_Addr
  308. elf_machine_dynamic (void)
  309. {
  310. /* This function is only used while bootstrapping the runtime linker.
  311. @@ -97,7 +97,7 @@
  312. }
  313. /* Return the run-time load address of the shared object. */
  314. -static __inline__ Elf32_Addr
  315. +static __always_inline Elf32_Addr
  316. elf_machine_load_address (void)
  317. {
  318. Elf32_Addr addr, tmp;
  319. @@ -118,7 +118,7 @@
  320. return addr - 3;
  321. }
  322. -static __inline__ void
  323. +static __always_inline void
  324. elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
  325. Elf32_Word relative_count)
  326. {