[PATCH] [ELF] Add --allow-multiple-definition option.

Shankar Kalpathi Easwaran shankarke at gmail.com
Fri Mar 28 08:50:58 PDT 2014


  actually infact, there is no warning even shown with gnu, you might want the errors that is displayed to the user when there is a multiple definition.

  Testcase with Gnu :-

  cat > 1.c << \!
  int foo = 10;
  !
  + cat

  cat > 2.c << \!
  int foo = 10;
  !
  + cat

  gcc -c 1.c 2.c
  + gcc -c 1.c 2.c
  ld 1.o 2.o --allow-multiple-definition
  + ld 1.o 2.o --allow-multiple-definition
  ld: warning: cannot find entry symbol _start; defaulting to 00000000004000b0

http://llvm-reviews.chandlerc.com/D3211

BRANCH
  allow-multiple-definition

ARCANIST PROJECT
  lld



More information about the llvm-commits mailing list