[PATCH] D23925: [ELF] Default to entry address 0x0 in case start symbol is not defined and entry point is not specified in command line

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 09:27:48 PDT 2016


rafael added a comment.

Moving

if (!Config->Entry.empty()) {

down past

for (std::unique_ptr<InputFile> &F : Files)

only seems to change the order of symbols in the output and should allow you to check if there is a _start in the symbol table already.

BTW, if the input is just

.quad _start

we should still produce an error and I think this patch would not.

Also, looks like bfd default to some other value

d.bfd: warning: cannot find entry symbol _start; defaulting to 0000000000400040


Repository:
  rL LLVM

https://reviews.llvm.org/D23925





More information about the llvm-commits mailing list