summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlpha Lam <hclam@google.com>2012-05-30 11:18:35 -0700
committerAlpha Lam <hclam@google.com>2012-06-04 18:03:41 -0700
commit2926571be60e91bab521c36b8a169a3843b4a719 (patch)
treedaf4b11493c46ffe320cb90719b7782068d96af0
parent4890853010847479bb88a43829824649a547c478 (diff)
downloadlibvpx-2926571be60e91bab521c36b8a169a3843b4a719.tar.gz
Fix windows build: obj_int_extract to extract numbrs from .rdata
The change in assembly offset files to define values as const int broke Windows build, because the variables are stored in .rdata section instead of .data section. This CL changes the integer peeking from .data to .rdata. Change-Id: I87e465ddcc78d39ec29f3720ea7df0ab807d5512
-rw-r--r--build/make/obj_int_extract.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/build/make/obj_int_extract.c b/build/make/obj_int_extract.c
index 04e14a6c8..bf317bd7b 100644
--- a/build/make/obj_int_extract.c
+++ b/build/make/obj_int_extract.c
@@ -680,7 +680,7 @@ int parse_coff(uint8_t *buf, size_t sz)
uint32_t symoffset;
char **sectionlist; //this array holds all section names in their correct order.
- //it is used to check if the symbol is in .bss or .data section.
+ //it is used to check if the symbol is in .bss or .rdata section.
nsections = get_le16(buf + 2);
symtab_ptr = get_le32(buf + 8);
@@ -725,15 +725,15 @@ int parse_coff(uint8_t *buf, size_t sz)
}
strcpy(sectionlist[i], sectionname);
- if (!strcmp(sectionname, ".data")) sectionrawdata_ptr = get_le32(ptr + 20);
+ if (!strcmp(sectionname, ".rdata")) sectionrawdata_ptr = get_le32(ptr + 20);
ptr += 40;
}
//log_msg("COFF: Symbol table at offset %u\n", symtab_ptr);
- //log_msg("COFF: raw data pointer ofset for section .data is %u\n", sectionrawdata_ptr);
+ //log_msg("COFF: raw data pointer ofset for section .rdata is %u\n", sectionrawdata_ptr);
- /* The compiler puts the data with non-zero offset in .data section, but puts the data with
+ /* The compiler puts the data with non-zero offset in .rdata section, but puts the data with
zero offset in .bss section. So, if the data in in .bss section, set offset=0.
Note from Wiki: In an object module compiled from C, the bss section contains
the local variables (but not functions) that were declared with the static keyword,