Skip to content
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

ld: fatal: symbol `A__frametable' is multiply-defined #2552

Closed
vicuna opened this issue May 5, 2004 · 1 comment
Closed

ld: fatal: symbol `A__frametable' is multiply-defined #2552

vicuna opened this issue May 5, 2004 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented May 5, 2004

Original bug ID: 2552
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hello,

J'ai un problème avec "ocamlopt -pack" sur Solaris. J'ai configuré OCaml
pour indiquer les GNU binutils 2.14. Le linker est celui de Sun.

Voici un exemple minimal.

clipper ~/tmp $ touch a.ml
clipper ~/tmp $ ocamlopt -pack -o b.cmx a.ml
clipper ~/tmp $ ocamlopt -o x b.cmx a.ml
ld: fatal: symbol `A__frametable' is multiply-defined:
(file a.o and file b.o);
ld: fatal: File processing errors. No output written to x
collect2: ld returned 1 exit status
Error during linking

nm donne pour b.o:
00000004 R A__frametable
00000004 D B
00000010 D B__A
0000001c T B__A__code_begin
00000028 T B__A__code_end
0000000c D B__A__data_begin
00000010 D B__A__data_end
0000001c T B__A__entry
00000000 T B__code_begin
0000001c T B__code_end
00000000 D B__data_begin
00000008 D B__data_end
00000000 T B__entry
00000000 R B__frametable

On voit que A__frametable n'a pas été renommé.

Sur un autre système (un FreeBSD, avec les GNU binutils 2.10, et GNU ld),
j'ai:

00000004 D B
00000014 D B__A
00000010 T B__A__code_begin
00000016 T B__A__code_end
00000010 D B__A__data_begin
00000014 D B__A__data_end
00000010 T B__A__entry
00000018 D B__A__frametable
00000000 T B__code_begin
00000010 T B__code_end
00000000 D B__data_begin
00000008 D B__data_end
00000000 T B__entry
0000000c D B__frametable

En fait, après un "ocamlopt -c a.ml", "nm a.o" donne:

  • sur Solaris:
    00000004 D A
    00000000 T A__code_begin
    0000000c T A__code_end
    00000000 D A__data_begin
    00000004 D A__data_end
    00000000 T A__entry
    00000000 R A__frametable

  • sur FreeBSD:
    00000004 D A
    00000000 T A__code_begin
    00000006 T A__code_end
    00000000 D A__data_begin
    00000004 D A__data_end
    00000000 T A__entry
    00000008 D A__frametable

Donc A__frametable se retrouve dans une section read-only, et ocamlopt ne
le renomme pas (il ne renomme que les T et les D, pas les R).

-- Alain

@vicuna
Copy link
Author

vicuna commented May 8, 2004

Comment author: administrator

Fixed 2004-05-08 by XL

@vicuna vicuna closed this as completed May 8, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant