diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-09-20 20:32:25 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-09-20 20:32:25 -0700 |
commit | c0a08a6827a294f74b0ee5feaf5542081cff4381 (patch) | |
tree | a54e053d050f648d52369fcf2932fdc7a872703f /upb/pb/decoder_x64.dasc | |
parent | 56f7a345d7572e118d4a370bb8e79b328d16bc0e (diff) |
Fixes to get upb to compile inside Google.
Diffstat (limited to 'upb/pb/decoder_x64.dasc')
-rw-r--r-- | upb/pb/decoder_x64.dasc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/upb/pb/decoder_x64.dasc b/upb/pb/decoder_x64.dasc index c56506e..72c4aa1 100644 --- a/upb/pb/decoder_x64.dasc +++ b/upb/pb/decoder_x64.dasc @@ -44,7 +44,9 @@ // for a few magic numbers and doing a dumb string replacement. #ifndef __APPLE__ +const unsigned char upb_jit_debug_elf_file[] = { #include "upb/pb/jit_debug_elf_file.h" +}; typedef enum { @@ -73,9 +75,9 @@ void __attribute__((noinline)) __jit_debug_register_code() { __asm__ __volatile_ void upb_reg_jit_gdb(upb_decoder *d) { // Create debug info. - size_t elf_len = upb_pb_jit_debug_elf_file_o_len; + size_t elf_len = sizeof(upb_jit_debug_elf_file); d->debug_info = malloc(elf_len); - memcpy(d->debug_info, upb_pb_jit_debug_elf_file_o, elf_len); + memcpy(d->debug_info, upb_jit_debug_elf_file, elf_len); uint64_t *p = (void*)d->debug_info; for (; (void*)(p+1) <= (void*)d->debug_info + elf_len; ++p) { if (*p == 0x12345678) { *p = (uintptr_t)d->jit_code; } |