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
- 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
- Build Status
Buildable 16146 Build 16146: arc lint + arc unit
Event Timeline
lld/ELF/SymbolTable.cpp | ||
---|---|---|
420 | Why was it necessary to inline this reportDuplicate? |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
420 | 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 | 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. |
Logic by itself looks OK to me.
+1 to leave inlining for the follow-up.
lld/ELF/SymbolTable.cpp | ||
---|---|---|
420 | That is not what was changed by this patch, but have to note |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
510–511 | Please leave the check for AllowMultipleDefinition in reportDuplicate. Both overloads should check it or none. |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
510–511 | Done. |
lld/ELF/SymbolTable.cpp | ||
---|---|---|
510–511 | Have you forgot to upload a new patch? In any case, LGTM with that. |
Why was it necessary to inline this reportDuplicate?