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 for amd64 fails with binutils 2.21 #5237
Comments
Comment author: ecc The attached patch seems to fix the issue by reordering the .section directive. Almost the entire test suite passes. (The one failure was stack overflow detection in native code -- the overflow is detected, but the stack size is evidently different than was used for the reference output.) |
Comment author: spiralvoice A similar problems happens when compiling Ocaml 3.12.0 on Debian sid x86 ../boot/ocamlrun ../ocamlopt -warn-error A -nostdlib -g |
Comment author: spiralvoice The attached patch fixed the problem here |
Comment author: @glondu There are also sparc and powerpc as native architectures on Debian... but they don't seem to be affected by this bug (I've checked on sparc, powerpc looks similar). I've opened a Debian bug to keep track of this issue: |
Comment author: int-e Note that you need a very recent binutils release to reproduce this error: 2.21.0.20110216 (Debian sid) did not have this check. |
Comment author: @glondu Note that spiralvoice's patch is incorrect. Attached is the patch (merging Eric and spiralvoice's ones) as applied in Debian. |
Comment author: @xavierleroy S. Glondu's patch is correct. Applied in 3.12 bugfix branch and in trunk. Will be part of release 3.12.1. |
Original bug ID: 5237
Reporter: ecc
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.12.0
Fixed in version: 3.12.1+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: zorun mehdi @glondu @hcarty
Bug description
$ cat bug.ml
let f x = x *. 1.0
$ as --version # version currently in Debian "sid"
GNU assembler (GNU Binutils for Debian) 2.21.0.20110302
$ ocamlopt bug.ml
/tmp/camlasmd5071c.s: Assembler messages:
/tmp/camlasmd5071c.s:74: Error: .size expression does not evaluate to a constant
File "bug.ml", line 1, characters 0-1:
Error: Assembler error, input left in file /tmp/camlasmd5071c.s
Additional information
The same assembly file is produced by ocamlopt 3.11.2 and 3.12.0.
With this version of binutils:
GNU assembler (GNU Binutils for Debian) 2.20.1-system.20100303
(from Debian "squeeze") it assembles OK.
The problematic line seems to be the following:
.section .rodata.cst8,"a",@progbits
File attachments
The text was updated successfully, but these errors were encountered: