Skip to content

32bit mac non-opt build doesn't work #7221

Closed
@graydon

Description

@graydon

It appears to have trouble linking.


...
cp: i686-apple-darwin/stage1/lib/rustc/i686-apple-darwin/lib/librustllvm.dylib
compile_and_link: i686-apple-darwin/stage1/lib/rustc/i686-apple-darwin/lib/librustc.dylib
...
LLVM ERROR: Section too large, can't encode r_address (0x10006ad) into 24 bits of scattered relocation entry.
make: *** [i686-apple-darwin/stage1/lib/rustc/i686-apple-darwin/lib/librustc.dylib] Error 1

Possibly related: http://code.google.com/p/go/issues/detail?id=3253

No idea really. It does seem like mach-o has something called a "scattered" reloc, and that this has only a 24bit displacement:

http://developer.apple.com/library/Mac/documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html#//apple_ref/c/tag/scattered_relocation_info

r_address

...

    Since this field is only 24 bits long, the offset in this field can never be larger than 0x00FFFFFF, thus limiting the size of the relocatable contents of this image to 16 megabytes.

Possibly we can fiddle linker and LLVM options to not generate these. Or we can get our codegen improved to the point where none of our libraries are 16+mb, which would be cool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-linkageArea: linking into static, shared libraries and binariesO-macosOperating system: macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions