Comment 4 for bug 810402

Revision history for this message
St├ęphane Glondu (glondu) wrote :

> how is the camlstartup .s file generated, or how can it be saved?

-dstartup option to ocamlopt. Adding -ccopt -Wl,-v shows the ld call:

/usr/bin/ld --build-id --no-add-needed --as-needed --eh-frame-hdr -dynamic-linker /lib/ -X --hash-style=gnu -m armelf_linux_eabi -z relro -o a.out /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.3/../../../crt1.o /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.3/../../../crti.o /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.3/crtbegin.o -L/usr/lib/ocaml -L/usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.3 -L/usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.3/../../.. -L/usr/lib/arm-linux-gnueabi -v /tmp/camlstartup86089c.o /usr/lib/ocaml/std_exit.o empty.o /usr/lib/ocaml/stdlib.a /usr/lib/ocaml/libasmrun.a -lm -ldl -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.3/crtend.o /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.3/../../../crtn.o

> trying to figure out if it's a linker or an assembler issue, could
> you try to build with new as and old ld, and old as and new ld?

 - new as, old ld: the resulting binary doesn't segfault
 - old as, new ld: the resulting binary segfaults