| Index: third_party/tcmalloc/chromium/src/base/basictypes.h
|
| ===================================================================
|
| --- third_party/tcmalloc/chromium/src/base/basictypes.h (revision 41940)
|
| +++ third_party/tcmalloc/chromium/src/base/basictypes.h (working copy)
|
| @@ -240,7 +240,7 @@
|
| # define HAVE_ATTRIBUTE_SECTION_START 1
|
|
|
| #elif defined(HAVE___ATTRIBUTE__) && defined(__MACH__)
|
| -# define ATTRIBUTE_SECTION(name) __attribute__ ((section ("__TEXT, " #name)))
|
| +# define ATTRIBUTE_SECTION(name) __attribute__ ((section ("__DATA, " #name)))
|
|
|
| #include <mach-o/getsect.h>
|
| #include <mach-o/dyld.h>
|
| @@ -251,32 +251,18 @@
|
| if (_dyld_present()) {
|
| for (int i = _dyld_image_count() - 1; i >= 0; --i) {
|
| const mach_header* hdr = _dyld_get_image_header(i);
|
| -#ifdef MH_MAGIC_64
|
| - if (hdr->magic == MH_MAGIC_64) {
|
| - uint64_t len;
|
| - *pstart = getsectdatafromheader_64((mach_header_64*)hdr,
|
| - "__TEXT", name, &len);
|
| - if (*pstart) { // NULL if not defined in this dynamic library
|
| - *pstart += _dyld_get_image_vmaddr_slide(i); // correct for reloc
|
| - *pend = *pstart + len;
|
| - return;
|
| - }
|
| + uint32_t len;
|
| + *pstart = getsectdatafromheader(hdr, "__DATA", name, &len);
|
| + if (*pstart) { // NULL if not defined in this dynamic library
|
| + *pstart += _dyld_get_image_vmaddr_slide(i); // correct for reloc
|
| + *pend = *pstart + len;
|
| + return;
|
| }
|
| -#endif
|
| - if (hdr->magic == MH_MAGIC) {
|
| - uint32_t len;
|
| - *pstart = getsectdatafromheader(hdr, "__TEXT", name, &len);
|
| - if (*pstart) { // NULL if not defined in this dynamic library
|
| - *pstart += _dyld_get_image_vmaddr_slide(i); // correct for reloc
|
| - *pend = *pstart + len;
|
| - return;
|
| - }
|
| - }
|
| }
|
| }
|
| // If we get here, not defined in a dll at all. See if defined statically.
|
| unsigned long len; // don't ask me why this type isn't uint32_t too...
|
| - *pstart = getsectdata("__TEXT", name, &len);
|
| + *pstart = getsectdata("__DATA", name, &len);
|
| *pend = *pstart + len;
|
| }
|
| };
|
|
|