commit | 25eeac0518f90bfba94049c56fce50cca6074d3d | [log] [tgz] |
---|---|---|
author | Rui Ueyama <ruiu@google.com> | Tue Feb 04 07:56:52 2014 -0800 |
committer | Johann <johannkoenig@google.com> | Tue Feb 04 07:56:52 2014 -0800 |
tree | c9f72dceb904c38c6cfbdbf0d7cf790cc5e3474c | |
parent | 2b7338aca4c820010a4fbad114b13ba27a6e2556 [diff] |
Skip COMDAT sections when parsing COFF Fixes https://code.google.com/p/chromium/issues/detail?id=339889 when building Clang-based ASan on Windows Change-Id: Ib77d9593636f46827dbb77f087d407ec0f463fc7
diff --git a/build/make/obj_int_extract.c b/build/make/obj_int_extract.c index 8c16957..819ce9d 100644 --- a/build/make/obj_int_extract.c +++ b/build/make/obj_int_extract.c
@@ -666,7 +666,11 @@ } strcpy(sectionlist[i], sectionname); - if (!strcmp(sectionname, ".rdata")) sectionrawdata_ptr = get_le32(ptr + 20); + // check if it's .rdata and is not a COMDAT section. + if (!strcmp(sectionname, ".rdata") && + (get_le32(ptr + 36) & 0x1000) == 0) { + sectionrawdata_ptr = get_le32(ptr + 20); + } ptr += 40; }