[swift-dev] [SR-40] Port Swift to Arm progress / question
Dmitri Gribenko
gribozavr at gmail.com
Wed Dec 9 22:23:32 CST 2015
Here's a relevant line (there are lots, this is just one instance):
003a91cc 0015d403 R_ARM_REL32 003af914 _TMps13GeneratorType
_TMps13GeneratorType ---> protocol descriptor for Swift.GeneratorType
Dmitri
On Wed, Dec 9, 2015 at 7:25 PM, William Dillon <william at housedillon.com> wrote:
> I’m looking at that pull request currently, thanks for the link.
>
> Here is the output of readelf -r for libswiftcore, test.swift (as compiled)
> and test.swift.
>
> Thanks for looking into this!
> - Will
>
>
>
> On Dec 9, 2015, at 7:14 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>
> On Wed, Dec 9, 2015 at 7:05 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>
> On Wed, Dec 9, 2015 at 3:05 PM, William Dillon via swift-dev
> <swift-dev at 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 <gribozavr at gmail.com>*/
>
>
>
--
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 <gribozavr at gmail.com>*/
More information about the swift-dev
mailing list