<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJzNV0tz2zYQ_jXUBQMOHxJFHXSQ5XGbiV0ncZxmevGAwJKCBRIqAEqWf30WlKzoYbedxgfNcPDYXSy__QDskoUW6_FFK5WQTUWupIFSP5FSG8JMnfVJzbi2ZCXdjAhpWaFAEL1wspbPzEndWMIasdErJUjJpNqYB-kkiC6DaBJk0fbppkpk_RBNUU_AGG38wIDSvPNHLr5M_pj-nmREWqJbR3RJDGsq8GY0zgbxqN8fJV7baEdkQ4LBBY3TfhIPh0keJFPyMhkGg8sgvUDnJRhoOFjywJnCN70XkmwY9c8ESTbMzgRJ3D8XTuL4XDiJ8vw8kAxG-VnsTjIaxdH_5qR-RyRplP_CiX1PJEmUJ_FZZLYUb04SvQcnR8l_0959_bKrDpQIvWqUZoLMnFtYr0iu8Ck3pYhySR0PLZilRO9hrZ-lUizkukYjtpDY_t1CC9gvY2wcs3PsplcLfv_X4-zzDVPLjzerepLfPlSoMG1jsYv8auNkybjz80VbKMlxUPha6P2AdZxZCB0z4bN1ggQ-dIQWB4MpcTPp65xSBJ4WCLWrechUSpwmfbICmFuyMw-S0Uu4yAV6JJR2PulTSU7etKOrs-ZiZ-Fhaa3m0uFIycIws95BPlykcD-D5AIffJVdW6NxJ32cDEuzd4PNDeO3d9_jOIxCK-aEXv2jHgV3a-vA8369e_cnI5fMwZVhNay0waBp3X0zPNElGIunjdayCdJL74ZQjA5x4xRbvsOHgVfgUMqY4bOsT9lioYAKZlZIKdXk-_01oX8qPHm0lAqUtMjAFKWhHxJCaNlaoP7EX_rPEFq-4CFTzTUjVOnike_LJ62Q-iuyWeD3DlUGrFZLQsIQg_rZWOCtkc5H2li7YR1bbupy2z1sxz4gHIXs2MWjX2bN_tlC20f7YB3eRn664DUSUCygaKvN4mpuWutOV-6hRSsEnIZijaNjO66bUnpf8OTANEz5BdVCoek2xpfZ6-vxElaqu3J7EW2F2xVUrBtWS96NVWHrfe4_3N61Bm8eHAo_Svf2Du3vqIEbEJLtC79JAa8ZX2POU5PWzaBBsjfpb099t2UMMR4gvF1A89v1gWV39qcdc605cTT5dqXbRpzIPdj7D8eSu3VdaLXDo3i7sPs2b_t6W3OtT8P73GKOe_baA2tmitP1Hd3Hwo7W_7Ipnfy-OdpBIfBe2Qut5_9C7m4b9mVdyr9hDaugxu07IXFbEw7eiHdmS-sb6u6QrYDNH36Kb8Ax9YoUz9gnxdZgjgrYlPtKGfSjRnLte9m41PdzwCrQE-NUjNIR6zE8d9qMK0zGQrZ1rzVqfFjlKrRvi201U2r50tGF0Y_AfZ6X1rbgr-UgGWbD3mws4gFAP-bxIB_FRZKOslGeQMaSZAhpWfKeYgUoO8aiHSRJAyvSucAxFuveryOQ4yRK4hjrf5SnWZSFfRHlIz4s8zyNh3HJkQio8Ucw9H5CbaqeGXcuMYFZVPqcbX8qmbWyagA6wIjQSadgfA7_ib0u8nEX9g9s5Mn_>52767</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
ld64.lld: error: relocation BRANCH26 is out of range: -165194492 is not in [-134217728, 134217727]; references _calloc
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
glandium
</td>
</tr>
</table>
<pre>
Building Firefox for arm64 macos with disabled optimizations and with lld fails with:
```
ld64.lld: error: relocation BRANCH26 is out of range: -165194492 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196704 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196676 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196144 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196116 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196088 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165195984 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165299108 is not in [-134217728, 134217727]; references _malloc
ld64.lld: error: relocation BRANCH26 is out of range: -165308144 is not in [-134217728, 134217727]; references _malloc
ld64.lld: error: relocation BRANCH26 is out of range: -165208212 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165311620 is not in [-134217728, 134217727]; references _malloc
```
STR:
- download https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/CFpcUZjhQMalvKMwmA8O_g/runs/0/artifacts/public/build/testcase.tar.zstd (/!\ this will expire within 3 to 4 weeks /!\)
- `tar --zstd -xf testcase.tar.zstd`
- `cd testcase/toolkit/library/build`
- `clang++ --sysroot /path/to/MacOSX11.0.sdk -F/path/to/MacOSX11.0.sdk/System/Library/PrivateFrameworks -mmacosx-version-min=11.0 -stdlib=libc++ --target=aarch64-apple-darwin -o XUL -Wl,-filelist,XUL.list -fuse-ld=lld -framework Cocoa -lobjc -framework AudioToolbox -lresolv ../../../security/nss/lib/crmf/crmf_crmf/libcrmf.a ../../../js/src/build/libjs_static.a ../../../aarch64-apple-darwin/debug/libgkrust.a ../../../security/libnss3.dylib ../../../config/external/lgpllibs/liblgpllibs.dylib ../../../mozglue/build/libmozglue.dylib -dynamiclib -lbsm -framework IOSurface -framework IOKit -framework AudioToolbox -framework CoreMedia -framework VideoToolbox -framework LocalAuthentication -framework Security -lm -framework OpenGL -framework SystemConfiguration -framework AVFoundation -framework CoreUI -framework CoreSymbolication -lcups -framework Foundation -framework CoreFoundation -framework CoreLocation -framework QuartzCore -framework Carbon -framework CoreAudio -framework CoreVideo -framework AudioToolbox -framework AudioUnit -framework AddressBook -framework OpenGL -framework Security -framework ServiceManagement -framework CoreServices -framework ApplicationServices -framework AppKit -weak_framework Metal -weak_framework MediaPlayer`
Cc: @nico @int3 @keith
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.ll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