We found that when you pass --allow-multiple-definitions or -z muldefs
to GNU linkers, they don't complain about duplicate symbols at all. They
don't even print out warnings on it. We emit warnings in that case.
If you pass --fatal-warnings, that difference results in a link failure.
Details
Details
- Reviewers
• espindola grimar - Commits
- rG048a669b9260: allow-multiple-definitions should completely suppress errors instead of making…
rLLD327920: allow-multiple-definitions should completely suppress errors instead of making…
rL327920: allow-multiple-definitions should completely suppress errors instead of making…
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lld/ELF/SymbolTable.cpp | ||
---|---|---|
420 ↗ | (On Diff #138650) | Why was it necessary to inline this reportDuplicate? |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
420 ↗ | (On Diff #138650) | It's not necessary, but since it is now short that it is easier to read than having a overloaded function. |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
420 ↗ | (On Diff #138650) | Leave that for a followup patch. There may be a better way of merging these two overloads and doing it in one patch makes the patch harder to read. |
Comment Actions
Logic by itself looks OK to me.
+1 to leave inlining for the follow-up.
lld/ELF/SymbolTable.cpp | ||
---|---|---|
420 ↗ | (On Diff #138650) | That is not what was changed by this patch, but have to note |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
515 ↗ | (On Diff #138744) | Please leave the check for AllowMultipleDefinition in reportDuplicate. Both overloads should check it or none. |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
515 ↗ | (On Diff #138744) | Done. |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
515 ↗ | (On Diff #138744) | Have you forgot to upload a new patch? In any case, LGTM with that. |