- User Since
- Apr 18 2013, 12:16 AM (234 w, 4 d)
Are you suggesting we implement the Unix-style, double-hyphen --version to lld-link? It would work, but it seem a bit strange to me, as all the other options starts with "/".
- Removed /v
- Added the version string to help message
Please change the patch subject to Revert r315877: Simplify. and write the reason (it causes MSVC 2015 to emit "C4307: '-': integral constant overflow" warning) as a commit message.
I'm not convinced. It may fail on some assert, or it may not work well with the current code, but my comment was from a more high-level design point of view. I'd like you to also think at high-level instead of tracing the existing code to explain why your patch needs to be in the current design.
This patch effectively reverts r315877, but it contains some formatting, so it is not a complete rollback patch. Can you re-create a patch using svn revert or git revert? Or I can do that for you.
You are right that we should handle 0 as 1. But please remove code for the rigorous error checking for const-ness. We just want to provide a reasonable error reporting, and this patch seem to have gone a bit too far. There are a lot of ways you can do wrong things using linker scripts, and I don't want to focus too much on some arbitrary corner case.
I'll make more changes to Relocations.cpp and other files, so you might want to rebase all at once.
Ah, thanks. It is a good surprise. So, the document says that "In 64-bit objects (files with e_ident[EI_CLASS] equal to ELFCLASS64), each entry is an array of 8-byte words in the format of the target processor." Maybe you should align it to Config->Wordsize instead of 4?
At this point I feel like we should define a function bool shouldExport(Defined *Sym) or something, so that we can move the code to that function.
I'd think you are overthinking. I don't think it is a good idea to add that many parameters to various functions just to check for a misuse of some rarely used feature. We should report an error instead of firing an assertion for SUBALIGN expression 0, but for const-ness, I'm not too excited about rigorous error checking.
Is there a documentation about this? (I understand there's little hope, but just asking.)
Fri, Oct 13
Thu, Oct 12
Wed, Oct 11
By the way, why does GNU ld export all symbols by default? Is it to emulate the ELF-ism on Windows?
Tue, Oct 10
Some parts of lld's source code is quite hard to understand now as an accumulated result of numerous patches. I'm trying to fix it now, so please spend a bit more time too to improve code quality so that it is understandable for future readers.
I will probably edit the comment later.
Mon, Oct 9
Thank you for explaining it. Can you add a summary to this code as a comment? Otherwise, it is still a mystery why we apply a bitmask there.
I think Live bit is abused in the output sections. That flag was introduced for gc, and originally only input sections have the flag. After that, a new class was introduced as a parent of both input sections and output sections, and at some point, we started using Live bit for output sections to indicate whether we want to emit it or not. But as far as I know, it was not discussed if that is a good approach.