ruiu (Rui Ueyama)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 18 2013, 12:16 AM (234 w, 4 d)

Recent Activity

Today

ruiu accepted D38973: COFF: Give manifest resource file a name..

LGTM

Mon, Oct 16, 3:03 PM
ruiu added a comment to D38972: Add the /v option which prints out the LLD version string..

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 "/".

Mon, Oct 16, 2:59 PM
ruiu updated the diff for D38972: Add the /v option which prints out the LLD version string..
  • Removed /v
  • Added the version string to help message
Mon, Oct 16, 1:51 PM
ruiu created D38972: Add the /v option which prints out the LLD version string..
Mon, Oct 16, 1:39 PM
ruiu accepted D38955: LLD/ELF: Fix C4307: '-': integral constant overflow for MSVC15.

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.

Mon, Oct 16, 11:37 AM
ruiu added a comment to D38724: [ELF] - Do not collect SHT_REL[A] sections unconditionally when --gc-sections and --emit-relocs used together..

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.

Mon, Oct 16, 10:50 AM
ruiu added a comment to D38955: LLD/ELF: Fix C4307: '-': integral constant overflow for MSVC15.

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.

Mon, Oct 16, 10:27 AM
ruiu added a comment to D38846: [ELF] - Linkerscript: Fix issues with SUBALIGN..

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.

Mon, Oct 16, 10:20 AM
ruiu added a comment to D31528: [ELF][MIPS] Multi-GOT implementation.

I'll make more changes to Relocations.cpp and other files, so you might want to rebase all at once.

Mon, Oct 16, 10:07 AM · lld

Yesterday

ruiu added a comment to D38907: Give .note.gnu.build-id section alignment 4.

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?

Sun, Oct 15, 5:54 PM · lld
ruiu committed rL315881: Remove Config::FirstElf..
Remove Config::FirstElf.
Sun, Oct 15, 2:43 PM
ruiu added a comment to D38937: [LLD] [COFF] Exclude certain static libraries and object files when exporting all symbols.
In D38937#898214, @ruiu wrote:

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.

Sounds like a good idea. How do you suggest to handle the exclude StringSets in that case - recreate them in each function invocation? Or have a static StringSet<> ExcludeSymbols in the global scope?

Sun, Oct 15, 2:31 PM
ruiu added a comment to D38937: [LLD] [COFF] Exclude certain static libraries and object files when exporting all symbols.

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.

Sun, Oct 15, 2:18 PM
ruiu committed rL315877: Simplify..
Simplify.
Sun, Oct 15, 2:07 PM
ruiu added a comment to D38846: [ELF] - Linkerscript: Fix issues with SUBALIGN..

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.

Sun, Oct 15, 1:54 PM
ruiu added inline comments to D38239: [ELF] - Define linkerscript symbols early..
Sun, Oct 15, 1:47 PM
ruiu added a comment to D38907: Give .note.gnu.build-id section alignment 4.

Is there a documentation about this? (I understand there's little hope, but just asking.)

Sun, Oct 15, 1:42 PM · lld

Fri, Oct 13

ruiu accepted D38910: [AMDGPU/LLD] Add RELATIVE64 relocation record..

LGTM

Fri, Oct 13, 5:44 PM
ruiu accepted D38899: [ELF] Recognize additional relocation types .

LGTM

Fri, Oct 13, 12:11 PM
ruiu added inline comments to D38724: [ELF] - Do not collect SHT_REL[A] sections unconditionally when --gc-sections and --emit-relocs used together..
Fri, Oct 13, 11:02 AM
ruiu accepted D38822: [lld] Move Threads to Common.

LGTM

Fri, Oct 13, 10:55 AM

Thu, Oct 12

ruiu added inline comments to D38239: [ELF] - Define linkerscript symbols early..
Thu, Oct 12, 11:07 PM
ruiu committed rL315673: Make it explicit that we are writing addends to target sections if REL..
Make it explicit that we are writing addends to target sections if REL.
Thu, Oct 12, 10:59 PM
ruiu committed rL315669: Destructure a boolean expression and add comment..
Destructure a boolean expression and add comment.
Thu, Oct 12, 9:04 PM
ruiu committed rL315667: Hide SymbolBody::IsLocal..
Hide SymbolBody::IsLocal.
Thu, Oct 12, 8:37 PM
ruiu committed rL315666: Make a condition more explicit. NFC..
Make a condition more explicit. NFC.
Thu, Oct 12, 8:37 PM
ruiu committed rL315664: Add comment..
Add comment.
Thu, Oct 12, 7:58 PM
ruiu committed rL315659: Simplify. NFCI..
Simplify. NFCI.
Thu, Oct 12, 6:42 PM
ruiu committed rL315658: Slightly simplify code and add comment..
Slightly simplify code and add comment.
Thu, Oct 12, 6:19 PM
ruiu committed rL315653: Simplify a boolean expression by the De Morgan's laws..
Simplify a boolean expression by the De Morgan's laws.
Thu, Oct 12, 5:36 PM
ruiu committed rL315625: Add comment..
Add comment.
Thu, Oct 12, 2:46 PM
ruiu committed rL315617: Handle MIPS-specific addend rules in computeAddend()..
Handle MIPS-specific addend rules in computeAddend().
Thu, Oct 12, 1:42 PM
ruiu committed rL315612: Early-continue for a MIPS-specific rule..
Early-continue for a MIPS-specific rule.
Thu, Oct 12, 1:04 PM
ruiu committed rL315609: Remove Symbol::isPreemptible()..
Remove Symbol::isPreemptible().
Thu, Oct 12, 12:10 PM

Wed, Oct 11

ruiu committed rL315560: Start destructuring adjustExpr function..
Start destructuring adjustExpr function.
Wed, Oct 11, 10:33 PM
ruiu committed rL315559: Fix comment..
Fix comment.
Wed, Oct 11, 9:53 PM
ruiu committed rL315558: Move more code out of scanRelocs()..
Move more code out of scanRelocs().
Wed, Oct 11, 9:52 PM
ruiu committed rL315555: Make a function shorter..
Make a function shorter.
Wed, Oct 11, 9:02 PM
ruiu committed rL315552: Remove one parameter from Target::getRelExpr..
Remove one parameter from Target::getRelExpr.
Wed, Oct 11, 8:14 PM
ruiu committed rL315548: Rewrite comment..
Rewrite comment.
Wed, Oct 11, 7:09 PM
ruiu committed rL315543: Rename P -> Pieces..
Rename P -> Pieces.
Wed, Oct 11, 5:43 PM
ruiu accepted D38828: lld: Reorder dependent libraries alphabetically.

LGTM

Wed, Oct 11, 4:15 PM
ruiu committed rL315525: Define RelType to represent relocation types..
Define RelType to represent relocation types.
Wed, Oct 11, 3:49 PM
ruiu accepted D38760: [LLD] [COFF] Add support for automatically exporting all symbols.

LGTM

Wed, Oct 11, 12:53 PM
ruiu added inline comments to D38760: [LLD] [COFF] Add support for automatically exporting all symbols.
Wed, Oct 11, 12:41 PM
ruiu added a comment to D38760: [LLD] [COFF] Add support for automatically exporting all symbols.

By the way, why does GNU ld export all symbols by default? Is it to emulate the ELF-ism on Windows?

Wed, Oct 11, 12:31 PM
ruiu committed rL315495: Return early if it fails to parse a hex string..
Return early if it fails to parse a hex string.
Wed, Oct 11, 12:30 PM
ruiu accepted D38815: [LLD] [COFF] Implement support for IMAGE_REL_ARM64_ADDR32NB.

LGTM

Wed, Oct 11, 12:09 PM
ruiu added inline comments to D38724: [ELF] - Do not collect SHT_REL[A] sections unconditionally when --gc-sections and --emit-relocs used together..
Wed, Oct 11, 12:06 PM
ruiu accepted D36508: [ELF] - Linkerscript: Add `~` as separate math token..

LGTM

Wed, Oct 11, 11:48 AM
ruiu added inline comments to D38760: [LLD] [COFF] Add support for automatically exporting all symbols.
Wed, Oct 11, 11:32 AM
ruiu added inline comments to D38239: [ELF] - Define linkerscript symbols early..
Wed, Oct 11, 11:24 AM
ruiu added inline comments to D38721: [ELF] - Teach LLD to report line numbers for data symbols..
Wed, Oct 11, 11:21 AM

Tue, Oct 10

ruiu accepted D38712: [ELF] Try to not emit weird diagnostics on undefined symbols.

LGTM

Tue, Oct 10, 10:24 PM
ruiu committed rL315436: Do not copy Sections vector..
Do not copy Sections vector.
Tue, Oct 10, 10:13 PM
ruiu committed rL315434: Split LinkerScript::computeInputSections into two functions..
Split LinkerScript::computeInputSections into two functions.
Tue, Oct 10, 9:50 PM
ruiu committed rL315433: Swap parameters of getSymbolValue..
Swap parameters of getSymbolValue.
Tue, Oct 10, 9:34 PM
ruiu committed rL315432: Do not handle DefinedCommon in linker scripts..
Do not handle DefinedCommon in linker scripts.
Tue, Oct 10, 9:31 PM
ruiu committed rL315431: Rename BytesDataCommand -> ByteCommand..
Rename BytesDataCommand -> ByteCommand.
Tue, Oct 10, 9:22 PM
ruiu committed rL315430: Inline LinkerScript::process..
Inline LinkerScript::process.
Tue, Oct 10, 9:22 PM
ruiu committed rL315427: Split a loop into two to make it clear that it did two different things..
Split a loop into two to make it clear that it did two different things.
Tue, Oct 10, 9:01 PM
ruiu committed rL315426: Use more precise type..
Use more precise type.
Tue, Oct 10, 9:01 PM
ruiu committed rL315425: Remove a static local varaible..
Remove a static local varaible.
Tue, Oct 10, 8:34 PM
ruiu committed rL315424: Avoid a pointer to a pointer to an input section..
Avoid a pointer to a pointer to an input section.
Tue, Oct 10, 8:23 PM
ruiu committed rL315423: Add comment..
Add comment.
Tue, Oct 10, 8:23 PM
ruiu committed rL315422: Split decompressAndMergeSection into two separate functions..
Split decompressAndMergeSection into two separate functions.
Tue, Oct 10, 8:13 PM
ruiu committed rL315421: Remove useless cast..
Remove useless cast.
Tue, Oct 10, 7:55 PM
ruiu committed rL315420: Rename filename -> getFilename..
Rename filename -> getFilename.
Tue, Oct 10, 7:55 PM
ruiu committed rL315419: Rename Align -> Alignment..
Rename Align -> Alignment.
Tue, Oct 10, 7:46 PM
ruiu committed rL315418: Rename CurAddressState -> Ctx..
Rename CurAddressState -> Ctx.
Tue, Oct 10, 7:46 PM
ruiu committed rL315416: Make LinkerScript::addSymbol a private member function..
Make LinkerScript::addSymbol a private member function.
Tue, Oct 10, 7:28 PM
ruiu committed rL315415: Rename processCommands -> processSectionCommands..
Rename processCommands -> processSectionCommands.
Tue, Oct 10, 7:28 PM
ruiu committed rL315414: Inline small functions..
Inline small functions.
Tue, Oct 10, 7:20 PM
ruiu committed rL315409: Rename Commands -> SectionCommands..
Rename Commands -> SectionCommands.
Tue, Oct 10, 6:51 PM
ruiu committed rL315405: Rename HasSections -> HasSectionsComand..
Rename HasSections -> HasSectionsComand.
Tue, Oct 10, 6:35 PM
ruiu committed rL315404: Move a loop invariant outside the loop..
Move a loop invariant outside the loop.
Tue, Oct 10, 6:26 PM
ruiu committed rL315403: Remove ScriptConfiguration class and move the members to LinkerScript class..
Remove ScriptConfiguration class and move the members to LinkerScript class.
Tue, Oct 10, 6:19 PM
ruiu committed rL315401: Inline addRegular into addSymbol..
Inline addRegular into addSymbol.
Tue, Oct 10, 6:03 PM
ruiu committed rL315394: Remove a constructor from ExprValue. NFC..
Remove a constructor from ExprValue. NFC.
Tue, Oct 10, 5:06 PM
ruiu committed rL315393: Add comments..
Add comments.
Tue, Oct 10, 5:01 PM
ruiu committed rL315386: Remove an unused default argument..
Remove an unused default argument.
Tue, Oct 10, 4:09 PM
ruiu committed rL315384: Handle input section liveness only in MarkLive.cpp..
Handle input section liveness only in MarkLive.cpp.
Tue, Oct 10, 3:59 PM
ruiu added inline comments to D38760: [LLD] [COFF] Add support for automatically exporting all symbols.
Tue, Oct 10, 2:16 PM
ruiu accepted D38761: [LLD] [MinGW] Hook up the --export-all-symbols and -output-def options.

LGTM

Tue, Oct 10, 1:58 PM
ruiu added inline comments to D38724: [ELF] - Do not collect SHT_REL[A] sections unconditionally when --gc-sections and --emit-relocs used together..
Tue, Oct 10, 1:07 PM
ruiu added a comment to D38721: [ELF] - Teach LLD to report line numbers for data symbols..

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.

Tue, Oct 10, 12:31 PM
ruiu added a comment to D37736: [ELF] - Do not set output section flags except SHF_{ALLOC,WRITE,EXECINSTR}..

I will probably edit the comment later.

Tue, Oct 10, 11:58 AM

Mon, Oct 9

ruiu committed rL315271: Make a local variable name shorter. NFC..
Make a local variable name shorter. NFC.
Mon, Oct 9, 9:53 PM
ruiu committed rL315270: Simplify..
Simplify.
Mon, Oct 9, 9:46 PM
ruiu committed rL315269: Remove dead function..
Remove dead function.
Mon, Oct 9, 8:58 PM
ruiu committed rL315268: Add comments..
Add comments.
Mon, Oct 9, 8:58 PM
ruiu committed rL315267: Add more comments..
Add more comments.
Mon, Oct 9, 8:41 PM
ruiu committed rL315266: Add comment to InputSectionBase::File..
Add comment to InputSectionBase::File.
Mon, Oct 9, 8:22 PM
ruiu committed rL315265: Remove dead function..
Remove dead function.
Mon, Oct 9, 8:01 PM
ruiu added inline comments to D38712: [ELF] Try to not emit weird diagnostics on undefined symbols.
Mon, Oct 9, 7:52 PM
ruiu added inline comments to D38712: [ELF] Try to not emit weird diagnostics on undefined symbols.
Mon, Oct 9, 7:38 PM
ruiu added a comment to D37736: [ELF] - Do not set output section flags except SHF_{ALLOC,WRITE,EXECINSTR}..

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.

Mon, Oct 9, 6:25 PM
ruiu added a comment to D38613: [ELF] - Change how we deal with unused synthetic sections..

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.

Mon, Oct 9, 5:55 PM
ruiu accepted D38660: Don't create a dummy __tls_get_addr.

LGTM

Mon, Oct 9, 5:46 PM
ruiu added inline comments to D38361: [ELF] Stop setting output section size early.
Mon, Oct 9, 5:40 PM