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 Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/810402

Title:
  all native ocaml programs segfault on armel

To manage notifications about this bug go to:
https://bugs.launchpad.net/binutils-linaro/+bug/810402/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to