On Wed, Dec 9, 2015 at 7:05 PM, Dmitri Gribenko <griboz...@gmail.com> wrote: > On Wed, Dec 9, 2015 at 3:05 PM, William Dillon via swift-dev > <swift-dev@swift.org> wrote: >> Nick was correct in noting that __muloti4 wasn’t needed on 32-bit platforms. >> I added another case to the preprocessor conditional for __muloti4, and >> specified __arm__ and __linux__ for mulodi4. The __multi3 and __divti3 >> references went away. >> >> Then, I went on to the module.map file for bringing in the Glibc headers. >> I’m trying to think of a way to either remove the architecture specific >> paths to many of those libraries (they’re now x86_64-linux-gnu, but need to >> be arm-linux-gnueabihf for arm). I read the modules documentation at >> http://clang.llvm.org/docs/Modules.html and it doesn’t look like it’s >> possible to have conditionals in there. I’m considering whether it’s a good >> idea to preprocess that file in some way to fill them out with the correct >> paths in the build scripts. I went ahead and changed them all (breaking >> x86_64 for the time being). > > Did you try https://github.com/apple/swift/pull/282 ? > >> At this point, the compiler and standard library are all built, and I think >> I have one final issue. In the testing suite, the binaries generated by the >> swift compiler don’t run. They’re emitting unexpected reloc type errors. >> It appears that reolc type 0x03 is R_ARM_REL32 which is not permitted for >> use with shared libraries: >> >> CollectionOfOne.swift.tmp/a.out: error while loading shared libraries: >> /home/wdillon/build/Ninja-ReleaseAssert/swift-linux-armv7/lib/swift/linux/libswiftCore.so: >> unexpected reloc type 0x03 >> >> This also happens with small example swift programs that I’ve written for >> testing. > > +John for this error.
It would be also helpful if you could find which code contains these relocations. Try 'objdump -R libswiftCore.so' or 'readelf -r'. Dmitri -- main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if (j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/ _______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev