-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ocamlopt -nodynlink does not work on armhf #8867
Comments
It seems (https://sourceware.org/ml/binutils/2009-04/msg00395.html) we should not be using Lines 389 to 392 in 0557f07
|
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
A friendly bot brought this issue to my attention, one year later. Generally speaking, Here I can reproduce the problem on my Raspbian rPi by using We need to discuss the future of the For ARM, not using |
@Armael may be interested in following this
|
Results of a quick experiment: For AMD64, PIC code is generated by default, which trumps ARM64, Power, and I386 (x86 32 bits) seem OK. s390x (Z systems) doesn't support PIE at all. RISC-V could not be tested. The appropriate action, I think, is to document that |
Including interactions with PIE. Closes: ocaml#8867
Closes ocaml#4069 When `dynlink:false` is passed, the ARM backend emits MOVW/MOVT instructions which have relocations incompatible with PIC code. This is similar to ocaml#2527 (ocaml issue: ocaml/ocaml#8867). Signed-off-by: Etienne Millon <me@emillon.org>
Closes ocaml#4069 When `dynlink:false` is passed, the ARM backend emits MOVW/MOVT instructions which have relocations incompatible with PIC code. This is similar to ocaml#2527 (ocaml issue: ocaml/ocaml#8867). Signed-off-by: Etienne Millon <me@emillon.org>
This is an optimization when PIC executables are not used, but this optimization is disabled becauses it causes errors on arm32. Most distributions are going in the direction of requiring PIC, and `-nodynlink` might go away (see ocaml/ocaml#8867), so the supporting code in dune (which is bypassed in most cases) can be removed. Closes #4069 Closes #2527 Signed-off-by: Etienne Millon <me@emillon.org>
This is an optimization when PIC executables are not used, but this optimization is disabled becauses it causes errors on arm32. Most distributions are going in the direction of requiring PIC, and `-nodynlink` might go away (see ocaml/ocaml#8867), so the supporting code in dune (which is bypassed in most cases) can be removed. Closes #4069 Closes #2527 Signed-off-by: Etienne Millon <me@emillon.org>
This is an optimization when PIC executables are not used, but this optimization is disabled becauses it causes errors on arm32. Most distributions are going in the direction of requiring PIC, and `-nodynlink` might go away (see ocaml/ocaml#8867), so the supporting code in dune (which is bypassed in most cases) can be removed. Closes #4069 Closes #2527 Signed-off-by: Etienne Millon <me@emillon.org>
This is an optimization when PIC executables are not used, but this optimization is disabled becauses it causes errors on arm32. Most distributions are going in the direction of requiring PIC, and `-nodynlink` might go away (see ocaml/ocaml#8867), so the supporting code in dune (which is bypassed in most cases) can be removed. Closes #4069 Closes #2527 Signed-off-by: Etienne Millon <me@emillon.org>
Hello,
As instructed in ocaml/dune#2527, I open an issue here.
When I compile a simple hello.ml file (Debian unstable armhf):
with
ocamlopt -nodynlink hello.ml
, I get relocation errors that go away when I remove-nodynlink
.Please have look at @nojb's insights in ocaml/dune#2527
The text was updated successfully, but these errors were encountered: