ocaml-maint team mailing list archive
-
ocaml-maint team
-
Mailing list archive
-
Message #00455
[Bug 810402] Re: all native ocaml programs segfault on armel
So digging into this problem, I can confirm that reverting binutils
resolves the build failure, so we're looking at a definate regression in
binutils. Looking at gdb and the source, the problem comes during
ocaml's internal initialization which is a bunch hand written ASM.
During startup, the application branches into caml_start_program, and
segfaults while trying to load the address of caml_program into r12:
.globl caml_start_program
caml_start_program:
ldr r12, .Lcaml_program
/* Code shared with caml_callback* */
/* Address of Caml code to call is in r12 */
/* Arguments to the Caml code are in r0...r3 */
and caml_program is in the global reference table at the botton:
.Lcaml_program: .word caml_program
caml_program appears to be the "main" function of the compiled OCaml
application, as its defined in every compiled ocaml binary I examined.
For some reason, caml_program is pointing to an invalid address so when
the process tries to load, it goes boom.
--
You received this bug notification because you are a member of Debian
OCaml Maintainers, which is subscribed to ocaml in Ubuntu.
https://bugs.launchpad.net/bugs/810402
Title:
all native ocaml programs segfault on armel
Status in Linaro Binutils:
New
Status in “binutils” package in Ubuntu:
Confirmed
Status in “ocaml” package in Ubuntu:
Confirmed
Status in “binutils” source package in Oneiric:
Confirmed
Status in “ocaml” source package in Oneiric:
Confirmed
Bug description:
Starting from version 2.21.52.20110606-1ubuntu1 (in oneiric), all
programs produced by ocamlopt segfault on Ubuntu/armel. The problem
disappears after downgrading binutils to 2.21.51.20110421-6ubuntu1.
Steps to reproduce: echo > empty.ml && ocamlopt empty.ml && ./a.out
Using the "-S" option of ocamlopt might be useful, to have a look at
the generated assembly code, but I don't know what to look for... I
hope someone more familiar with binutils code can help.
I found that while investigating the recent build failures of ocaml
stuff or armel. Everything works find in the armel port of Debian.
To manage notifications about this bug go to:
https://bugs.launchpad.net/binutils-linaro/+bug/810402/+subscriptions