From 2a0ed0a31db9961dcb7c87964091b22401c4d69b Mon Sep 17 00:00:00 2001 From: Apple Date: Wed, 30 Mar 2016 22:59:31 +0000 Subject: [PATCH] ld64-264.3.102.tar.gz --- src/ld/Options.cpp | 2 +- src/ld/parsers/macho_relocatable_file.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ld/Options.cpp b/src/ld/Options.cpp index 3281f66..0f5985d 100644 --- a/src/ld/Options.cpp +++ b/src/ld/Options.cpp @@ -937,7 +937,7 @@ Options::FileInfo Options::findFileUsingPaths(const std::string &path) const if ( !embeddedDylib ) { for (const auto* dir : fLibrarySearchPaths) { //fprintf(stderr,"Finding Library: %s/%s\n", dir, leafName); - auto possiblePath = dir + leafName; + std::string possiblePath = dir + std::string("/") + leafName; if ( findFile(possiblePath, {".tbd"}, result) ) return result; } diff --git a/src/ld/parsers/macho_relocatable_file.cpp b/src/ld/parsers/macho_relocatable_file.cpp index 9689bf0..ddf687a 100644 --- a/src/ld/parsers/macho_relocatable_file.cpp +++ b/src/ld/parsers/macho_relocatable_file.cpp @@ -2466,7 +2466,8 @@ void Parser::makeSections() for (uint32_t i=0; i < _machOSectionsCount; ++i) { const macho_section

* sect = &_sectionsStart[i]; - if ( (sect->offset() + sect->size() > _fileLength) && ((sect->flags() & SECTION_TYPE) != S_ZEROFILL) ) + uint8_t sectionType = (sect->flags() & SECTION_TYPE); + if ( (sect->offset() + sect->size() > _fileLength) && (sectionType != S_ZEROFILL) && (sectionType != S_THREAD_LOCAL_ZEROFILL) ) throwf("section %s/%s extends beyond end of file,", sect->segname(), sect->sectname()); if ( (sect->flags() & S_ATTR_DEBUG) != 0 ) { -- 2.47.2