diff options
Diffstat (limited to 'recipes-devtools/odcctools/files/fix-287.patch')
-rw-r--r-- | recipes-devtools/odcctools/files/fix-287.patch | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/recipes-devtools/odcctools/files/fix-287.patch b/recipes-devtools/odcctools/files/fix-287.patch new file mode 100644 index 0000000..44a1516 --- /dev/null +++ b/recipes-devtools/odcctools/files/fix-287.patch @@ -0,0 +1,154 @@ +Index: odcctools-9.2-ld/ld64/src/MachOReaderRelocatable.hpp +=================================================================== +--- odcctools-9.2-ld.orig/ld64/src/MachOReaderRelocatable.hpp 2013-08-15 16:31:17.183614865 +0000 ++++ odcctools-9.2-ld/ld64/src/MachOReaderRelocatable.hpp 2013-08-15 16:31:17.251614861 +0000 +@@ -28,6 +28,7 @@ + #include <stdint.h> + #include <math.h> + #include <unistd.h> ++#include <stdio.h> + #include <sys/param.h> + + #include <vector> +@@ -83,6 +84,25 @@ + uint32_t offset; + }; + ++class BaseAtom : public ObjectFile::Atom ++{ ++public: ++ BaseAtom() : fStabsStartIndex(0), fStabsCount(0) {} ++ ++ virtual void setSize(uint64_t size) = 0; ++ virtual void addReference(ObjectFile::Reference* ref) = 0; ++ virtual void sortReferences() = 0; ++ virtual void addLineInfo(const ObjectFile::LineInfo& info) = 0; ++ virtual uint64_t getObjectAddress() const = 0; ++ virtual uint32_t getOrdinal() const { return fOrdinal; } ++ virtual void setOrdinal(uint32_t value) { fOrdinal = value; } ++ virtual const void* getSectionRecord() const = 0; ++ virtual bool isAlias() const { return false; } ++ ++ uint32_t fStabsStartIndex; ++ uint32_t fStabsCount; ++ uint32_t fOrdinal; ++}; + + template <typename A> + class Reference : public ObjectFile::Reference +@@ -268,26 +288,6 @@ + + LinkEditSegment LinkEditSegment::fgSingleton; + +-class BaseAtom : public ObjectFile::Atom +-{ +-public: +- BaseAtom() : fStabsStartIndex(0), fStabsCount(0) {} +- +- virtual void setSize(uint64_t size) = 0; +- virtual void addReference(ObjectFile::Reference* ref) = 0; +- virtual void sortReferences() = 0; +- virtual void addLineInfo(const ObjectFile::LineInfo& info) = 0; +- virtual uint64_t getObjectAddress() const = 0; +- virtual uint32_t getOrdinal() const { return fOrdinal; } +- virtual void setOrdinal(uint32_t value) { fOrdinal = value; } +- virtual const void* getSectionRecord() const = 0; +- virtual bool isAlias() const { return false; } +- +- uint32_t fStabsStartIndex; +- uint32_t fStabsCount; +- uint32_t fOrdinal; +-}; +- + class BaseAtomSorter + { + public: +Index: odcctools-9.2-ld/ld64/src/Options.cpp +=================================================================== +--- odcctools-9.2-ld.orig/ld64/src/Options.cpp 2013-08-15 16:31:17.183614865 +0000 ++++ odcctools-9.2-ld/ld64/src/Options.cpp 2013-08-15 16:31:17.251614861 +0000 +@@ -28,6 +28,10 @@ + #include <mach/vm_prot.h> + #include <fcntl.h> + #include <vector> ++#include <stdio.h> ++#include <unistd.h> ++#include <string.h> ++#include <limits.h> + + #include "strlcpy.h" + #include "config.h" +Index: odcctools-9.2-ld/as/read.c +=================================================================== +--- odcctools-9.2-ld.orig/as/read.c 2013-08-15 11:27:09.000000000 +0000 ++++ odcctools-9.2-ld/as/read.c 2013-08-15 17:03:04.983570702 +0000 +@@ -507,7 +507,6 @@ + { "lcomm", s_lcomm, 0 }, + { "line", s_line, 0 }, + { "long", cons, 4 }, +- { "word", cons, 4 }, + { "quad", cons, 8 }, + { "lsym", s_lsym, 0 }, + { "section", s_section, 0 }, +Index: odcctools-9.2-ld/ld64/src/ld.cpp +=================================================================== +--- odcctools-9.2-ld.orig/ld64/src/ld.cpp 2013-08-15 16:31:17.183614865 +0000 ++++ odcctools-9.2-ld/ld64/src/ld.cpp 2013-08-15 16:53:09.007584481 +0000 +@@ -2926,42 +2926,42 @@ + switch (fArchitecture) { + case CPU_TYPE_POWERPC: + if ( mach_o::relocatable::Reader<ppc>::validFile(p) ) +- return this->addObject(new mach_o::relocatable::Reader<ppc>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addObject(new mach_o::relocatable::Reader<ppc>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( mach_o::dylib::Reader<ppc>::validFile(p, info.options.fBundleLoader) ) +- return this->addDylib(new mach_o::dylib::Reader<ppc>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addDylib(new mach_o::dylib::Reader<ppc>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( archive::Reader<ppc>::validFile(p, len) ) +- return this->addArchive(new archive::Reader<ppc>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addArchive(new archive::Reader<ppc>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + break; + case CPU_TYPE_POWERPC64: + if ( mach_o::relocatable::Reader<ppc64>::validFile(p) ) +- return this->addObject(new mach_o::relocatable::Reader<ppc64>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addObject(new mach_o::relocatable::Reader<ppc64>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( mach_o::dylib::Reader<ppc64>::validFile(p, info.options.fBundleLoader) ) +- return this->addDylib(new mach_o::dylib::Reader<ppc64>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addDylib(new mach_o::dylib::Reader<ppc64>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( archive::Reader<ppc64>::validFile(p, len) ) +- return this->addArchive(new archive::Reader<ppc64>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addArchive(new archive::Reader<ppc64>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + break; + case CPU_TYPE_I386: + if ( mach_o::relocatable::Reader<x86>::validFile(p) ) +- return this->addObject(new mach_o::relocatable::Reader<x86>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addObject(new mach_o::relocatable::Reader<x86>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( mach_o::dylib::Reader<x86>::validFile(p, info.options.fBundleLoader) ) +- return this->addDylib(new mach_o::dylib::Reader<x86>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addDylib(new mach_o::dylib::Reader<x86>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( archive::Reader<x86>::validFile(p, len) ) +- return this->addArchive(new archive::Reader<x86>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addArchive(new archive::Reader<x86>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + break; + case CPU_TYPE_X86_64: + if ( mach_o::relocatable::Reader<x86_64>::validFile(p) ) +- return this->addObject(new mach_o::relocatable::Reader<x86_64>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addObject(new mach_o::relocatable::Reader<x86_64>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( mach_o::dylib::Reader<x86_64>::validFile(p, info.options.fBundleLoader) ) +- return this->addDylib(new mach_o::dylib::Reader<x86_64>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addDylib(new mach_o::dylib::Reader<x86_64>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( archive::Reader<x86_64>::validFile(p, len) ) +- return this->addArchive(new archive::Reader<x86_64>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addArchive(new archive::Reader<x86_64>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + case CPU_TYPE_ARM: + if ( mach_o::relocatable::Reader<arm>::validFile(p) ) +- return this->addObject(new mach_o::relocatable::Reader<arm>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addObject(new mach_o::relocatable::Reader<arm>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( mach_o::dylib::Reader<arm>::validFile(p, info.options.fBundleLoader) ) +- return this->addDylib(new mach_o::dylib::Reader<arm>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addDylib(new mach_o::dylib::Reader<arm>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( archive::Reader<arm>::validFile(p, len) ) +- return this->addArchive(new archive::Reader<arm>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this->addArchive(new archive::Reader<arm>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + break; + break; + } |