You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4867 Reporter: kiyoshi Status: closed (set by @xavierleroy on 2011-05-29T10:20:16Z) Resolution: fixed Priority: normal Severity: major Version: 3.11.1 Fixed in version: 3.11.2+dev Category: ~DO NOT USE (was: OCaml general) Related to: #4760 #6900
Bug description
ocamlopt -shared failed as follows:
$ cat test.ml
type t = A | B | C | D
let f x = match x with A -> "A" | B -> "B" | C -> "C" | D -> "D"
$ ocamlopt -version
3.11.1
$ ocamlopt -shared test.ml -o dummy
ld: warning: -read_only_relocs cannot be used with x86_64
ld: pointer in read-only segment not allowed in slidable image, used in .L105 from test.o
collect2: ld returned 1 exit status
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
$ ocamlopt -s -shared test.ml -o dummy
ld: warning: -read_only_relocs cannot be used with x86_64
ld: pointer in read-only segment not allowed in slidable image, used in .L105 from test.o
collect2: ld returned 1 exit status
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
$ cat test.s
--- snip ---
_camlTest__f_67:
.L104:
sarq $1, %rax
leaq .L105(%rip), %r11
jmp *(%r11, %rax, 8)
.const
.align 3
.L105: .quad .L103
.quad .L102
.quad .L101
.quad .L100
--- snip ---
$
A dirty patch attached to this report will resolve this problem.
Additional information
$ uname -v
Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.6.1
BuildVersion: 10B504
$ port version
Version: 1.8.0
$ port list installed | grep ocaml
ocaml @3.11.1 private/ocaml
$
Thanks for the patch, which was a very useful starting point. Tentative fix in 3.11 release branch, will go in 3.11.2. The warning about "-read_only_relocs" doesn't show up on my Mac OS 10.5 test machine; we'll address it when testing under 10.6 soon.
Original bug ID: 4867
Reporter: kiyoshi
Status: closed (set by @xavierleroy on 2011-05-29T10:20:16Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.11.1
Fixed in version: 3.11.2+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #4760 #6900
Bug description
ocamlopt -shared failed as follows:
$ cat test.ml
type t = A | B | C | D
let f x = match x with A -> "A" | B -> "B" | C -> "C" | D -> "D"
$ ocamlopt -version
3.11.1
$ ocamlopt -shared test.ml -o dummy
ld: warning: -read_only_relocs cannot be used with x86_64
ld: pointer in read-only segment not allowed in slidable image, used in .L105 from test.o
collect2: ld returned 1 exit status
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
$ ocamlopt -s -shared test.ml -o dummy
ld: warning: -read_only_relocs cannot be used with x86_64
ld: pointer in read-only segment not allowed in slidable image, used in .L105 from test.o
collect2: ld returned 1 exit status
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
$ cat test.s
--- snip ---
_camlTest__f_67:
.L104:
sarq $1, %rax
leaq .L105(%rip), %r11
jmp *(%r11, %rax, 8)
.const
.align 3
.L105: .quad .L103
.quad .L102
.quad .L101
.quad .L100
--- snip ---
$
A dirty patch attached to this report will resolve this problem.
Additional information
$ uname -v
Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.6.1
BuildVersion: 10B504
$ port version
Version: 1.8.0
$ port list installed | grep ocaml
ocaml @3.11.1 private/ocaml
$
File attachments
The text was updated successfully, but these errors were encountered: