Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 81233 Details for
Bug 124682
sys-libs/glibc-2.3.6-r3 compile failure on hardened due to x86_64/string patches
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use direct GOT offsets instead of _rtld_global_ro for PIE builds
glibc-2.3.6-r3-PIE-amd64.patch (text/plain), 6.05 KB, created by
Kevin F. Quinn (RETIRED)
on 2006-03-03 13:18:52 UTC
(
hide
)
Description:
Use direct GOT offsets instead of _rtld_global_ro for PIE builds
Filename:
MIME Type:
Creator:
Kevin F. Quinn (RETIRED)
Created:
2006-03-03 13:18:52 UTC
Size:
6.05 KB
patch
obsolete
>--- sysdeps/x86_64/memcmp.S.orig 2006-03-03 22:04:26.000000000 +0100 >+++ sysdeps/x86_64/memcmp.S 2006-03-03 22:16:07.000000000 +0100 >@@ -7,9 +7,11 @@ > # INCLUDED WITH THIS FILE > > #include "sysdep.h" >-#include <rtld-global-offsets.h> >+#if defined PIC && !defined SHARED >+# include <rtld-global-offsets.h> >+#endif > >-#ifdef PIC >+#if defined PIC && !defined SHARED > .globl _rtld_local_ro > .hidden _rtld_local_ro > .set _rtld_local_ro,_rtld_global_ro >@@ -130,8 +132,13 @@ > L(memcmp32after): > > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r8 > mov RTLD_GLOBAL_DL_CACHE1SIZEHALF(%r8), %r9 >+# else >+ mov _dl_cache1sizehalf@GOTPCREL(%rip), %r8 >+ mov (%r8), %r9 >+# endif > #else > mov _dl_cache1sizehalf, %r9 > #endif >@@ -170,8 +177,13 @@ > > L(memcmp64try): > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r8 > mov RTLD_GLOBAL_DL_CACHE1SIZEHALF(%r8), %rcx >+# else >+ mov _dl_cache1sizehalf@GOTPCREL(%rip), %r8 >+ mov (%r8), %rcx >+# endif > #else > mov _dl_cache1sizehalf, %rcx > #endif >@@ -242,8 +254,13 @@ > > L(memcmppre): # 64-byte prefetching > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r8 > mov RTLD_GLOBAL_DL_CACHE2SIZEHALF(%r8), %rcx >+# else >+ mov _dl_cache2sizehalf@GOTPCREL(%rip), %r8 >+ mov (%r8), %rcx >+# endif > #else > mov _dl_cache2sizehalf, %rcx > #endif >--- sysdeps/x86_64/memcpy.S.orig 2006-03-03 22:07:50.000000000 +0100 >+++ sysdeps/x86_64/memcpy.S 2006-03-03 22:12:41.000000000 +0100 >@@ -8,7 +8,9 @@ > #include "asm-syntax.h" > #include "bp-sym.h" > #include "bp-asm.h" >-#include <rtld-global-offsets.h> >+#if defined(PIC) && !defined(SHARED) >+# include <rtld-global-offsets.h> >+#endif > > /* BEWARE: `#ifdef memcpy' means that memcpy is redefined as `mempcpy', > and the return value is the byte after the last one copied in >@@ -20,7 +22,7 @@ > #endif > > >-#ifdef PIC >+#if defined PIC && !defined SHARED > .globl _rtld_local_ro > .hidden _rtld_local_ro > .set _rtld_local_ro,_rtld_global_ro >@@ -187,8 +189,13 @@ > > LABEL(32after): > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r8 > mov RTLD_GLOBAL_DL_CACHE1SIZE(%r8), %r9 >+# else >+ mov _dl_cache1size@GOTPCREL(%rip), %r8 >+ mov (%r8), %r9 >+# endif > #else > mov _dl_cache1size, %r9 > #endif >@@ -223,8 +230,13 @@ > > LABEL(fasttry): > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r9 > mov RTLD_GLOBAL_DL_CACHE1SIZEHALF(%r9), %r11 >+# else >+ mov _dl_cache1sizehalf@GOTPCREL(%rip), %r9 >+ mov (%r9), %r11 >+# endif > #else > mov _dl_cache1sizehalf, %r11 > #endif >@@ -336,8 +348,13 @@ > > LABEL(pretry): > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r11 > mov RTLD_GLOBAL_DL_CACHE2SIZEHALF(%r11), %r8 >+# else >+ mov _dl_cache2sizehalf@GOTPCREL(%rip), %r11 >+ mov (%r11), %r8 >+# endif > #else > mov _dl_cache2sizehalf, %r8 > #endif >--- sysdeps/x86_64/memset.S.orig 2006-03-03 22:16:16.000000000 +0100 >+++ sysdeps/x86_64/memset.S 2006-03-03 22:18:06.000000000 +0100 >@@ -9,12 +9,14 @@ > #include "asm-syntax.h" > #include "bp-sym.h" > #include "bp-asm.h" >-#include <rtld-global-offsets.h> >+#if defined PIC && !defined SHARED >+# include <rtld-global-offsets.h> >+#endif > > /* BEWARE: `#ifdef memset' means that memset is redefined as `bzero' */ > #define BZERO_P (defined memset) > >-#ifdef PIC >+#if defined PIC && !defined SHARED > .globl _rtld_local_ro > .hidden _rtld_local_ro > .set _rtld_local_ro,_rtld_global_ro >@@ -151,8 +153,13 @@ > LABEL(32after): > > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r8 > mov RTLD_GLOBAL_DL_CACHE1SIZEHALF(%r8), %r9 >+# else >+ mov _dl_cache1sizehalf@GOTPCREL(%rip), %r8 >+ mov (%r8), %r9 >+# endif > #else > mov _dl_cache1sizehalf, %r9 > #endif >@@ -182,8 +189,13 @@ > > LABEL(alignafter): > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r9 > mov RTLD_GLOBAL_DL_CACHE2SIZEHALF(%r9), %r8 >+# else >+ mov _dl_cache2sizehalf@GOTPCREL(%rip), %r9 >+ mov (%r9), %r8 >+# endif > # For MP System half cache size is better, for UP full cache size > # is better -> use half cache size only > #else >--- sysdeps/x86_64/strcpy.S.orig 2006-03-03 22:18:33.000000000 +0100 >+++ sysdeps/x86_64/strcpy.S 2006-03-03 22:19:47.000000000 +0100 >@@ -7,10 +7,12 @@ > # INCLUDED WITH THIS FILE > > #include "sysdep.h" >-#include <rtld-global-offsets.h> >+#if defined PIC && !defined SHARED >+# include <rtld-global-offsets.h> >+#endif > > /* XXX: strncpy is broken, just use this for strcpy for now. */ >-#ifdef PIC >+#if defined PIC && !defined SHARED > .globl _rtld_local_ro > .hidden _rtld_local_ro > .set _rtld_local_ro,_rtld_global_ro >@@ -216,8 +218,13 @@ > > LABEL(64try): > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r8 > mov RTLD_GLOBAL_DL_CACHE1SIZEHALF(%r8), %r9 >+# else >+ mov _dl_cache1sizehalf@GOTPCREL(%rip), %r8 >+ mov (%r8), %r9 >+# endif > #else > mov _dl_cache1sizehalf, %r9 > #endif >@@ -380,8 +387,13 @@ > > LABEL(pretry): > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r8 > mov RTLD_GLOBAL_DL_CACHE2SIZEHALF(%r8), %r9 >+# else >+ mov _dl_cache2sizehalf@GOTPCREL(%rip), %r8 >+ mov (%r8), %r9 >+# endif > #else > mov _dl_cache2sizehalf, %r9 > #endif >--- sysdeps/x86_64/strlen.S.orig 2006-03-03 22:19:54.000000000 +0100 >+++ sysdeps/x86_64/strlen.S 2006-03-03 22:20:44.000000000 +0100 >@@ -7,9 +7,11 @@ > # INCLUDED WITH THIS FILE > > #include "sysdep.h" >-#include <rtld-global-offsets.h> >+#if defined PIC && !defined SHARED >+# include <rtld-global-offsets.h> >+#endif > >-#ifdef PIC >+#if defined PIC && !defined SHARED > .globl _rtld_local_ro > .hidden _rtld_local_ro > .set _rtld_local_ro,_rtld_global_ro >@@ -141,8 +143,13 @@ > # mov (%rsi), %rax > > #ifdef PIC >+# ifdef SHARED > mov _rtld_local_ro@GOTPCREL(%rip), %r8 > mov RTLD_GLOBAL_DL_CACHE1SIZE(%r8), %r9 >+# else >+ mov _dl_cache1size@GOTPCREL(%rip), %r8 >+ mov (%r8), %r9 >+# endif > #else > mov _dl_cache1size, %r9 > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 124682
:
81132
|
81216
|
81230
|
81233
|
82184