Page MenuHomePhabricator

MaskRay (Fangrui Song)
User

Projects

User Details

User Since
Dec 30 2016, 3:24 PM (141 w, 1 d)

Recent Activity

Yesterday

MaskRay updated the diff for D67560: [llvm-ar] Parse 'h' and '-h': display help and exit.

Parse -h (supported by GNU ar as well)
Address review comments

Sat, Sep 14, 8:06 AM · Restricted Project
MaskRay committed rG8f6d40e9b185: [clang-scan-deps] Add -M to work around -MT issue after r371918 (authored by MaskRay).
[clang-scan-deps] Add -M to work around -MT issue after r371918
Sat, Sep 14, 12:25 AM
MaskRay committed rL371920: [clang-scan-deps] Add -M to work around -MT issue after r371918.
[clang-scan-deps] Add -M to work around -MT issue after r371918
Sat, Sep 14, 12:24 AM

Fri, Sep 13

MaskRay committed rG55abd2b2956f: [Driver] Fix multiple bugs related to dependency file options: -M -MM -MD -MMD… (authored by MaskRay).
[Driver] Fix multiple bugs related to dependency file options: -M -MM -MD -MMD…
Fri, Sep 13, 11:01 PM
MaskRay committed rL371918: [Driver] Fix multiple bugs related to dependency file options: -M -MM -MD -MMD….
[Driver] Fix multiple bugs related to dependency file options: -M -MM -MD -MMD…
Fri, Sep 13, 11:01 PM
MaskRay committed rG6fe3d36768bc: [Driver] Improve Clang::getDependencyFileName and its tests after rC371853 (authored by MaskRay).
[Driver] Improve Clang::getDependencyFileName and its tests after rC371853
Fri, Sep 13, 9:16 PM
MaskRay committed rL371917: [Driver] Improve Clang::getDependencyFileName and its tests after rC371853.
[Driver] Improve Clang::getDependencyFileName and its tests after rC371853
Fri, Sep 13, 9:16 PM
MaskRay added inline comments to D67368: [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr..
Fri, Sep 13, 8:46 PM · Restricted Project
MaskRay added inline comments to D67555: [docs][llvm-size] Write llvm-size documentation.
Fri, Sep 13, 8:17 PM · Restricted Project
MaskRay added inline comments to D67554: [docs][llvm-strings] Write llvm-strings documentation.
Fri, Sep 13, 7:56 PM · Restricted Project
MaskRay updated subscribers of D67449: [llvm-ar] Include a line number when failing to parse an MRI script.

I wish we can create a new function for MRI error reporting but as it stands, runMRIScript can call readLibrary, addChildMember, and addMember which can in turn call fail or failIfError, so fail has to be aware of the MRI line number. +@grimar @jhenderson in case they have suggestions.

Fri, Sep 13, 7:29 PM · Restricted Project
MaskRay added reviewers for D67449: [llvm-ar] Include a line number when failing to parse an MRI script: grimar, jhenderson.
Fri, Sep 13, 7:29 PM · Restricted Project
MaskRay committed rG2f519d7072bf: [llvm-objcopy] Ignore -B --binary-architecture= (authored by MaskRay).
[llvm-objcopy] Ignore -B --binary-architecture=
Fri, Sep 13, 6:37 PM
MaskRay committed rGba53030dd093: [llvm-objcopy] Default --output-target to --input-target when unspecified (authored by MaskRay).
[llvm-objcopy] Default --output-target to --input-target when unspecified
Fri, Sep 13, 6:37 PM
MaskRay committed rL371914: [llvm-objcopy] Ignore -B --binary-architecture=.
[llvm-objcopy] Ignore -B --binary-architecture=
Fri, Sep 13, 6:37 PM
MaskRay closed D67215: [llvm-objcopy] Ignore -B --binary-architecture=.
Fri, Sep 13, 6:36 PM · Restricted Project
MaskRay committed rL371913: [llvm-objcopy] Default --output-target to --input-target when unspecified.
[llvm-objcopy] Default --output-target to --input-target when unspecified
Fri, Sep 13, 6:36 PM
MaskRay closed D67144: [llvm-objcopy] Default --output-target to --input-target when unspecified.
Fri, Sep 13, 6:36 PM · Restricted Project
MaskRay committed rG8a468031cd0b: [llvm-ar] Uncapitalize error messages and delete full stop (authored by MaskRay).
[llvm-ar] Uncapitalize error messages and delete full stop
Fri, Sep 13, 6:23 PM
MaskRay committed rL371912: [llvm-ar] Uncapitalize error messages and delete full stop.
[llvm-ar] Uncapitalize error messages and delete full stop
Fri, Sep 13, 6:23 PM
MaskRay closed D67558: [llvm-ar] Uncapitalize and delete full stop from error messages.
Fri, Sep 13, 6:22 PM · Restricted Project
MaskRay added inline comments to D67506: GSYM: add encoding and decoding to FunctionInfo.
Fri, Sep 13, 6:22 PM
MaskRay accepted D67284: [LLD][ELF][ARM] Implement --fix-cortex-a8 to fix erratum 657417.

LGTM, just a few nits and a requested test.

Fri, Sep 13, 10:12 AM
MaskRay updated the diff for D67558: [llvm-ar] Uncapitalize and delete full stop from error messages.

Wrap two other error messages

Fri, Sep 13, 9:46 AM · Restricted Project
MaskRay updated the diff for D67558: [llvm-ar] Uncapitalize and delete full stop from error messages.

Wrap operation names in ''

Fri, Sep 13, 9:26 AM · Restricted Project
MaskRay added inline comments to D67558: [llvm-ar] Uncapitalize and delete full stop from error messages.
Fri, Sep 13, 9:26 AM · Restricted Project
MaskRay updated the diff for D67558: [llvm-ar] Uncapitalize and delete full stop from error messages.

Delete !

Fri, Sep 13, 9:17 AM · Restricted Project
MaskRay created D67560: [llvm-ar] Parse 'h' and '-h': display help and exit.
Fri, Sep 13, 9:15 AM · Restricted Project
MaskRay created D67558: [llvm-ar] Uncapitalize and delete full stop from error messages.
Fri, Sep 13, 9:07 AM · Restricted Project
MaskRay updated the diff for D67504: [ELF] Make MergeInputSection merging aware of output sections.

Thanks for the review!

Fri, Sep 13, 8:10 AM · Restricted Project
MaskRay added a comment to rGb4160cb94c54: [ADT] Remove a workaround for old versions of clang.

a workaround -> workarounds.

Fri, Sep 13, 6:54 AM
MaskRay accepted D67548: [docs][llvm-readelf][llvm-readobj] Improve --stack-sizes documentation.

LG. D65313 added the support for GNU style output.

Fri, Sep 13, 6:51 AM · Restricted Project
MaskRay accepted D67546: [docs][llvm-objcopy][llvm-strip] Improve --strip-unneeded description.

Looks good. The behavior was introduced in D66623.

Fri, Sep 13, 6:04 AM · Restricted Project
MaskRay added inline comments to D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..
Fri, Sep 13, 4:11 AM · Restricted Project
MaskRay added inline comments to D67284: [LLD][ELF][ARM] Implement --fix-cortex-a8 to fix erratum 657417.
Fri, Sep 13, 2:13 AM

Thu, Sep 12

MaskRay added inline comments to D67409: [RISCV] enable LTO support, pass some options to linker..
Thu, Sep 12, 11:18 PM · Restricted Project
MaskRay added a comment to D67504: [ELF] Make MergeInputSection merging aware of output sections.

Two passes assign InputSectionBases to OutputSections:

Thu, Sep 12, 8:45 PM · Restricted Project
MaskRay added a parent revision for D67531: [ELF] Delete SectionBase::assigned: D67504: [ELF] Make MergeInputSection merging aware of output sections.
Thu, Sep 12, 8:29 PM · Restricted Project
MaskRay created D67531: [ELF] Delete SectionBase::assigned.
Thu, Sep 12, 8:29 PM · Restricted Project
MaskRay added a child revision for D67504: [ELF] Make MergeInputSection merging aware of output sections: D67531: [ELF] Delete SectionBase::assigned.
Thu, Sep 12, 8:29 PM · Restricted Project
MaskRay committed rG51ead00bf81c: [ELF] Delete a redundant assignment to SectionBase::assigned. NFC (authored by MaskRay).
[ELF] Delete a redundant assignment to SectionBase::assigned. NFC
Thu, Sep 12, 7:23 PM
MaskRay committed rL371804: [ELF] Delete a redundant assignment to SectionBase::assigned. NFC.
[ELF] Delete a redundant assignment to SectionBase::assigned. NFC
Thu, Sep 12, 7:16 PM
MaskRay added inline comments to D67506: GSYM: add encoding and decoding to FunctionInfo.
Thu, Sep 12, 5:51 PM
MaskRay added a reviewer for D67409: [RISCV] enable LTO support, pass some options to linker.: MaskRay.
Thu, Sep 12, 10:02 AM · Restricted Project
MaskRay added inline comments to D67409: [RISCV] enable LTO support, pass some options to linker..
Thu, Sep 12, 9:54 AM · Restricted Project
MaskRay committed rG2ad25a4aeeae: [ELF] ICF: change a dyn_cast<InputSection> to cast (authored by MaskRay).
[ELF] ICF: change a dyn_cast<InputSection> to cast
Thu, Sep 12, 9:46 AM
MaskRay committed rL371744: [ELF] ICF: change a dyn_cast<InputSection> to cast.
[ELF] ICF: change a dyn_cast<InputSection> to cast
Thu, Sep 12, 9:45 AM
MaskRay updated the diff for D67504: [ELF] Make MergeInputSection merging aware of output sections.

Delete unrelated InputSectionIterator (I tried changing InputSectionDescription::sections from an InputSection* vector to InputSectionBase* vector, but the result is not clean - many subsequent passes assume the elements of sections are InputSections. The size of OutputSection is not a big concern, so I added another field instead)

Thu, Sep 12, 9:14 AM · Restricted Project
MaskRay created D67504: [ELF] Make MergeInputSection merging aware of output sections.
Thu, Sep 12, 8:53 AM · Restricted Project
MaskRay accepted D67445: [yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers..
Thu, Sep 12, 4:02 AM · Restricted Project
MaskRay accepted D67488: [lib/ObjectYAML] - Change interface to return `bool` instead of `int`. NFCI..
Thu, Sep 12, 3:58 AM · Restricted Project
MaskRay updated subscribers of D45375: [ELF] - Introduce synthetic file for linker script symbols..
Thu, Sep 12, 2:53 AM
MaskRay added inline comments to D67445: [yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers..
Thu, Sep 12, 2:39 AM · Restricted Project
MaskRay added a reviewer for D67445: [yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers.: sbc100.
Thu, Sep 12, 2:39 AM · Restricted Project
MaskRay added inline comments to D67481: [ELF] Add -z separate-loadable-segments to complement separate-code and noseparate-code.
Thu, Sep 12, 2:07 AM · Restricted Project
MaskRay updated the diff for D67481: [ELF] Add -z separate-loadable-segments to complement separate-code and noseparate-code.

separate-segments -> separate-loadable-segments

Thu, Sep 12, 2:07 AM · Restricted Project
MaskRay committed rG786ce3fbd625: [ELF] Fix a common-page-size typo (authored by MaskRay).
[ELF] Fix a common-page-size typo
Thu, Sep 12, 2:02 AM
MaskRay committed rL371716: [ELF] Fix a common-page-size typo.
[ELF] Fix a common-page-size typo
Thu, Sep 12, 1:57 AM
MaskRay committed rG60ff4dd9cd8a: [ELF] Support -z undefs (authored by MaskRay).
[ELF] Support -z undefs
Thu, Sep 12, 1:57 AM
MaskRay committed rL371715: [ELF] Support -z undefs.
[ELF] Support -z undefs
Thu, Sep 12, 1:57 AM
MaskRay closed D67479: [ELF] Support -z undefs.
Thu, Sep 12, 1:57 AM · Restricted Project
MaskRay added a comment to D67482: [ELF][X86] Allow PT_LOAD to have overlapping p_offset ranges on EM_X86_64.

This patch is the (awful) reason I posted D67325 before this one. 🤔

Thu, Sep 12, 1:43 AM · Restricted Project
MaskRay created D67482: [ELF][X86] Allow PT_LOAD to have overlapping p_offset ranges on EM_X86_64.
Thu, Sep 12, 1:43 AM · Restricted Project
MaskRay added inline comments to D67481: [ELF] Add -z separate-loadable-segments to complement separate-code and noseparate-code.
Thu, Sep 12, 1:17 AM · Restricted Project
MaskRay created D67481: [ELF] Add -z separate-loadable-segments to complement separate-code and noseparate-code.
Thu, Sep 12, 1:16 AM · Restricted Project
MaskRay accepted D67357: [llvm-objdump] Fix llvm-objdump --all-headers output order.
Thu, Sep 12, 1:15 AM · Restricted Project

Wed, Sep 11

MaskRay added inline comments to D67479: [ELF] Support -z undefs.
Wed, Sep 11, 11:24 PM · Restricted Project
MaskRay updated the diff for D67325: [ELF] Map the ELF header at imageBase.

Update description

Wed, Sep 11, 11:16 PM · Restricted Project
MaskRay added a comment to D67325: [ELF] Map the ELF header at imageBase.

Apologies for the delay in responding. I've gone through in a bit more detail. Just to make sure I understand and hopefully give an alternative explanation to anyone else following:

Wed, Sep 11, 11:15 PM · Restricted Project
MaskRay added a comment to D67479: [ELF] Support -z undefs.

Some findings related to the topic. There are two kinds of unresolved references: 1) from object files 2) from shared objects. --unresolved-symbols= toggles both bits while -z (un)defs and --(no-)allow-shlib-undefined toggles one bit, respectively. I personally favor the fine-grained options over --unresolved-symbols=

Wed, Sep 11, 10:04 PM · Restricted Project
MaskRay created D67479: [ELF] Support -z undefs.
Wed, Sep 11, 9:35 PM · Restricted Project
MaskRay added a comment to D67287: [Diagnostics] Add -Wsizeof-array-div.

Thanks for review/advices!

Wed, Sep 11, 5:10 AM · Restricted Project
MaskRay added inline comments to D67343: [DebugInfo] Change object::RelocationResolver to return Expected<uint64_t>.
Wed, Sep 11, 3:37 AM · Restricted Project
MaskRay updated the diff for D67343: [DebugInfo] Change object::RelocationResolver to return Expected<uint64_t>.

Address review comments

Wed, Sep 11, 3:32 AM · Restricted Project
MaskRay updated the diff for D67343: [DebugInfo] Change object::RelocationResolver to return Expected<uint64_t>.

Address review comments

Wed, Sep 11, 3:28 AM · Restricted Project
MaskRay added a comment to D67357: [llvm-objdump] Fix llvm-objdump --all-headers output order.

Looks reasonable. Verified that check-lld (a heavy llvm-objdump user) also passed.

Wed, Sep 11, 1:18 AM · Restricted Project
MaskRay committed rG6b9df910d04f: [LTO] Avoid calling GlobalValue::getGUID (MD5) twice (authored by MaskRay).
[LTO] Avoid calling GlobalValue::getGUID (MD5) twice
Wed, Sep 11, 12:39 AM
MaskRay committed rL371593: [LTO] Avoid calling GlobalValue::getGUID (MD5) twice.
[LTO] Avoid calling GlobalValue::getGUID (MD5) twice
Wed, Sep 11, 12:39 AM
MaskRay committed rG27f2b81b6b72: [llvm-objcopy] Simplify --prefix-alloc-sections (authored by MaskRay).
[llvm-objcopy] Simplify --prefix-alloc-sections
Wed, Sep 11, 12:25 AM
MaskRay committed rL371591: [llvm-objcopy] Simplify --prefix-alloc-sections.
[llvm-objcopy] Simplify --prefix-alloc-sections
Wed, Sep 11, 12:22 AM
MaskRay closed D66931: [llvm-objcopy] Simplify --prefix-alloc-sections.
Wed, Sep 11, 12:21 AM · Restricted Project

Tue, Sep 10

MaskRay committed rG2aace1ea226e: [ELF][test] Make tests more tolerant to exact symbol addresses (authored by MaskRay).
[ELF][test] Make tests more tolerant to exact symbol addresses
Tue, Sep 10, 11:25 PM
MaskRay committed rL371588: [ELF][test] Make tests more tolerant to exact symbol addresses.
[ELF][test] Make tests more tolerant to exact symbol addresses
Tue, Sep 10, 11:18 PM
MaskRay added inline comments to D67325: [ELF] Map the ELF header at imageBase.
Tue, Sep 10, 9:26 PM · Restricted Project
MaskRay updated the diff for D67325: [ELF] Map the ELF header at imageBase.

Update a comment

Tue, Sep 10, 9:26 PM · Restricted Project
MaskRay added a comment to D67301: [LLD] Use the unified llvm demangle frontend function. NFC..
In D67301#1665171, @rnk wrote:

I hope at least for ELF, you can keep the "_Z" prefix check. It doesn't need the ObjC "___Z" extension.

Are you sure? Surely users could use -fblocks to get those manglings, or use ObjC on Linux.

Tue, Sep 10, 7:37 PM · Restricted Project
MaskRay committed rG9ca1b94a6d3f: [CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage… (authored by MaskRay).
[CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage…
Tue, Sep 10, 6:57 PM
MaskRay committed rL371586: [CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage….
[CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage…
Tue, Sep 10, 6:56 PM
MaskRay closed D67058: [clang][CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type.
Tue, Sep 10, 6:56 PM · Restricted Project, Restricted Project
MaskRay committed rG56a34f4541cb: [llvm-nm] Fix -DBUILD_SHARED_LIBS=ON builds after D66160/r371576 (authored by MaskRay).
[llvm-nm] Fix -DBUILD_SHARED_LIBS=ON builds after D66160/r371576
Tue, Sep 10, 6:51 PM
MaskRay committed rL371585: [llvm-nm] Fix -DBUILD_SHARED_LIBS=ON builds after D66160/r371576.
[llvm-nm] Fix -DBUILD_SHARED_LIBS=ON builds after D66160/r371576
Tue, Sep 10, 6:51 PM
MaskRay added a comment to D67325: [ELF] Map the ELF header at imageBase.

There is a clash between allocateHeaders and fixSectionAlignments and your change resolves this by only running allocateHeaders in the linkerscript. I can see that this would work, but I think that this could be at the expense of missing some of the logic in allocateHeaders, and leaving a point to diverge in the future. As this is making me a bit nervous at the moment I'd like to try and understand the conflict a bit better and whether there is a better way of doing this (there may not be).

Tue, Sep 10, 8:32 AM · Restricted Project
MaskRay updated the diff for D67325: [ELF] Map the ELF header at imageBase.

Address review comments

Tue, Sep 10, 8:23 AM · Restricted Project
MaskRay added a reviewer for D67301: [LLD] Use the unified llvm demangle frontend function. NFC.: MaskRay.
Tue, Sep 10, 7:46 AM · Restricted Project
MaskRay added a comment to D67301: [LLD] Use the unified llvm demangle frontend function. NFC..

This change is not NFC. This will cause every port of LLD to demangle more names than which were allowed before.

Tue, Sep 10, 7:46 AM · Restricted Project
MaskRay committed rG1eda21e214f2: [ELF][test] Make tests more tolerant to exact symbol addresses (authored by MaskRay).
[ELF][test] Make tests more tolerant to exact symbol addresses
Tue, Sep 10, 5:28 AM
MaskRay committed rL371514: [ELF][test] Make tests more tolerant to exact symbol addresses.
[ELF][test] Make tests more tolerant to exact symbol addresses
Tue, Sep 10, 5:27 AM
MaskRay added inline comments to D67284: [LLD][ELF][ARM] Implement --fix-cortex-a8 to fix erratum 657417.
Tue, Sep 10, 4:22 AM
MaskRay added a comment to D45375: [ELF] - Introduce synthetic file for linker script symbols..

I recently came across the <internal> issue, and was just reminded of the presence of the patch. I am in favor of this change.

Tue, Sep 10, 4:14 AM
MaskRay added a comment to D67388: Add a feature to dump dependency graph..

I looked at the sample provided and I think that if I was a new user, I'd find not clear what is "<internal>" probably.
What about including something like "<internal> is usually a symbol defined by linker" line to the header?

Also I am not sure what is situation now, but before we used to report "<internal>" for linker script defined symbols
in our messages sometimes. Would be nice to have a test for that case.

"<internal>" does not represent a symbol but a file. Ideally we should give more meaningful name for each virtual file, but I think that's beyond the scope of this patch.

If it reports "<internal>" for a symbol from a linker script still - it should be mentioned in the header. Otherwise it might be not clear where a sybmol is coming from.

If we want to have a meaningful file name for synthesized sections, linker synthesized symbols, and SymbolAssignment symbols, we have to create a new InputFile::Kind

std::string lld::toString(const InputFile *f) {
  if (!f)  // this can be null for various reasons above
    return "<internal>";

I suggested the same previously: D45375

Tue, Sep 10, 3:23 AM · Restricted Project