]> git.saurik.com Git - apple/ld64.git/commitdiff
ld64-264.3.102.tar.gz developer-tools-731 v264.3.102
authorApple <opensource@apple.com>
Wed, 30 Mar 2016 22:59:31 +0000 (22:59 +0000)
committerApple <opensource@apple.com>
Wed, 30 Mar 2016 22:59:31 +0000 (22:59 +0000)
src/ld/Options.cpp
src/ld/parsers/macho_relocatable_file.cpp

index 3281f667646ccaeb4faa8521cfbb2d09161d9f16..0f5985de5e3ea9832a0d3747c0a3d5144b83468e 100644 (file)
@@ -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);
                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;
                        }
                                if ( findFile(possiblePath, {".tbd"}, result) )
                                        return result;
                        }
index 9689bf07890d5ecbd81eb4da8de73d97b298582d..ddf687a002122224546878647c0b9ac856d04d7a 100644 (file)
@@ -2466,7 +2466,8 @@ void Parser<A>::makeSections()
 
        for (uint32_t i=0; i < _machOSectionsCount; ++i) {
                const macho_section<P>* sect = &_sectionsStart[i];
 
        for (uint32_t i=0; i < _machOSectionsCount; ++i) {
                const macho_section<P>* 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 ) {
                        throwf("section %s/%s extends beyond end of file,", sect->segname(), sect->sectname());
 
                if ( (sect->flags() & S_ATTR_DEBUG) != 0 ) {