Thread overview
ld: warning: pointer not aligned at address on iOS
Mar 21, 2020
Jacob Carlborg
Mar 21, 2020
kinke
Mar 22, 2020
Jacob Carlborg
Mar 22, 2020
kinke
March 21, 2020
So far I've been building LDC against upstream LLVM 9.0.0. When I build with the LDC fork of LLVM, 9.0.1 I a bunch of the following warnings when compiling the test runners for iOS:

ld: warning: pointer not aligned at address 0x10321E776 (anon + 1270 from ~/development/d/ios-druntime/ldc-build-runtime.tmp/lib/libphobos2-ldc-unittest-debug.a(uni.o))

ld: warning: pointer not aligned at address 0x1033AAFB3 (anon + 110 from lib/libdruntime-ldc-debug.a(ti_Areal.o))

I'm not sure if it's because it's LLVM 9.0.1 or if it's because the LDC fork.

-- 
/Jacob Carlborg
March 21, 2020
On Saturday, 21 March 2020 at 19:20:22 UTC, Jacob Carlborg wrote:
> I'm not sure if it's because it's LLVM 9.0.1 or if it's because the LDC fork.

There's only one LDC-specific Mach-O related change potentially related to this, https://github.com/ldc-developers/llvm-project/commit/110deda1bc1cf195983fea8c1107886057987955. [The effect of which can be tested by hacking LDC, grep for `emitMachODwarfLineAsRegularSection`.]
March 22, 2020
On 2020-03-21 20:29, kinke wrote:

> There's only one LDC-specific Mach-O related change potentially related to this, https://github.com/ldc-developers/llvm-project/commit/110deda1bc1cf195983fea8c1107886057987955. [The effect of which can be tested by hacking LDC, grep for `emitMachODwarfLineAsRegularSection`.]

Yeah, that's it. If I run with `--preserve-dwarf-line-section=false` the problem is gone. That's unfortunate :(. It seem to run properly anyway.

-- 
/Jacob Carlborg
March 22, 2020
On Sunday, 22 March 2020 at 08:01:33 UTC, Jacob Carlborg wrote:
> Yeah, that's it. If I run with `--preserve-dwarf-line-section=false` the problem is gone. That's unfortunate :(. It seem to run properly anyway.

Well, it was clear from the beginning that that's a hack, and the proper fix needs to be in druntime, not relying on extra preserved sections for backtrace lineinfos (https://issues.dlang.org/show_bug.cgi?id=20510).

On the plus side, it should only affect builds with debuginfos and can be disabled without hacking LDC (thx, I forgot about that switch).