Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 640966 | Differences between
and this patch

Collapse All | Expand All

(-)a/csu/libc-tls.c (-1 / +9 lines)
Lines 102-105 init_static_tls (size_t memsz, size_t align) Link Here
102
}
102
}
103
103
104
static void silly_slow_memcpy(char * dst, const char * src, size_t sz) {
105
  for (size_t i = 0; i < sz; ++i) {
106
    dst[i] = src[i];
107
  }
108
}
109
104
void
110
void
105
__libc_setup_tls (void)
111
__libc_setup_tls (void)
Lines 176-182 __libc_setup_tls (void) Link Here
176
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
182
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
177
#endif
183
#endif
184
178
  _dl_static_dtv[2].pointer.to_free = NULL;
185
  _dl_static_dtv[2].pointer.to_free = NULL;
179
  /* sbrk gives us zero'd memory, so we don't need to clear the remainder.  */
186
  /* sbrk gives us zero'd memory, so we don't need to clear the remainder.  */
180
  memcpy (_dl_static_dtv[2].pointer.val, initimage, filesz);
187
  //memcpy (_dl_static_dtv[2].pointer.val, initimage, filesz);
188
  silly_slow_memcpy(_dl_static_dtv[2].pointer.val, initimage, filesz);
181
189
182
  /* Install the pointer to the dtv.  */
190
  /* Install the pointer to the dtv.  */

Return to bug 640966