Page MenuHomePhabricator
Feed Advanced Search

Yesterday

ruiu added a comment to D68062: Propeller lld framework for basicblock sections.

Since you have moved all the files to a separate directory, it is probably better to create README.md to explain what Propeller is and how it works. You may want to move some file comments to that file.

Tue, Nov 19, 10:48 PM · Restricted Project
ruiu accepted D70468: [ELF] Error if -Ttext-segment is specified.

LGTM

Tue, Nov 19, 9:32 PM · Restricted Project
ruiu added a comment to D70421: Initialize global vectors with invalid members to catch uninitialization errors.

Does it make sense to accumulate all global variables in the one place? Like place them to a separate file with initGlobals method?
I think one of their problems is that they spreaded everywhere and initialized from many places.

Tue, Nov 19, 9:04 PM · Restricted Project
ruiu added a comment to D66426: [lld] Enable a watermark of loadable sections to be generated and placed in a note section.

I think this feature is worth more attention. There may be someone who wants to start using this once it's landed, and I'd make sure that we satisfy their needs. Do you mind if I ask you to start a thread on llvm-dev to propose this feature? I think that even a comment like "we'll use this" is valuable. tlike "

Tue, Nov 19, 8:57 PM · Restricted Project
ruiu added inline comments to D70420: Use lld::make<T> to make TpiSource objects.
Tue, Nov 19, 8:25 PM · Restricted Project
ruiu committed rG47feae5dd61d: Use lld::make<T> to make TpiSource objects (authored by ruiu).
Use lld::make<T> to make TpiSource objects
Tue, Nov 19, 8:21 PM
ruiu closed D70420: Use lld::make<T> to make TpiSource objects.
Tue, Nov 19, 8:21 PM · Restricted Project
ruiu added a comment to D70398: [lld] Support copy relocations for TLS symbols.

I think I agree with dalias. I don't get a point to allow users to use copy relocations liberally for a new ISA/ABI like RISC-V, and it looks like it is a problem that we should fix compilers as soon as possible, rather than adopting the linker to what compilers emit at the moment. Even though I can see the reason why you wanted to add this to lld, I can also imagine that that would be a regrettable decision in the long term.

Tue, Nov 19, 7:57 PM · Restricted Project
ruiu added a comment to D70399: [llvm-readobj/llvm-readelf] - Improve dumping of versioning sections..

I agree that making the field an enumeration is an improvement, but I also feel that the closing bracket ] on a different line is a bit verbose.

Ideally we can make it on one line, e.g. Flags [], Flags [ Info (0x4), 0x8] (0x8 is an unspecified bit field. Bikeshedding on the representation welcomed!)

Tue, Nov 19, 6:05 PM · Restricted Project
ruiu added inline comments to D70468: [ELF] Error if -Ttext-segment is specified.
Tue, Nov 19, 5:56 PM · Restricted Project
ruiu added a comment to D70421: Initialize global vectors with invalid members to catch uninitialization errors.

The other way of testing this is actually invoking the linker twice from main(), only in a test mode (specified by some environment variable), to see if it works. It is doable, and it should be able to detect all errors, but I'm not sure if we want to run tests twice.

Tue, Nov 19, 12:22 AM · Restricted Project
ruiu added inline comments to D70146: [ELF] Improve --gc-sections compatibility with GNU ld regarding section groups.
Tue, Nov 19, 12:22 AM · Restricted Project

Mon, Nov 18

ruiu added a comment to D70398: [lld] Support copy relocations for TLS symbols.

James, I'm sorry that I think I missed your second comment. So if gcc and clang uses LE model even for extern TLS variables, I agree with you that it's odd. They may have wanted to avoid the cost of more general access models, but because the linker is able to relax them, that shouldn't be a big problem.

Mon, Nov 18, 11:35 PM · Restricted Project
ruiu accepted D70146: [ELF] Improve --gc-sections compatibility with GNU ld regarding section groups.

LGTM

Mon, Nov 18, 11:12 PM · Restricted Project
ruiu created D70421: Initialize global vectors with invalid members to catch uninitialization errors.
Mon, Nov 18, 11:00 PM · Restricted Project
ruiu created D70420: Use lld::make<T> to make TpiSource objects.
Mon, Nov 18, 10:20 PM · Restricted Project
ruiu added a comment to D70378: [LLD][COFF] Fix missing cache cleanup in COFF::link().

I share your concern and I'm sorry about leaving so many global variables as uninitialized in the second run of the linker in the same process. But I'd like to find and fix the problems without abolishing global variables in lld, as I don't actually dislike them. One thing we could do is initializing global variables with invalid data -- like -1 or {nullptr} so that you'd get an error even on the first run if you do not reset them before use. I'll create a patch and send it to you.

Mon, Nov 18, 9:40 PM · lld, Restricted Project
ruiu added a reverting change for rG17e37ba57a69: Fix shared lib build.: rG45f8ee5f3c5a: Revert "Fix shared lib build.".
Mon, Nov 18, 7:11 PM
ruiu committed rG45f8ee5f3c5a: Revert "Fix shared lib build." (authored by ruiu).
Revert "Fix shared lib build."
Mon, Nov 18, 7:11 PM
ruiu added a comment to D70398: [lld] Support copy relocations for TLS symbols.

Copy relocation is a hack to allow non-PIC object files to be linked with DSOs. And it is a bit dangerous hack because people don't usually understand the exact semantics of the copy relocation and can make an ABI-breaking change without knowing it. I described the problem here: https://github.com/llvm/llvm-project/blob/master/lld/ELF/Relocations.cpp#L517-L558

Mon, Nov 18, 6:53 PM · Restricted Project
ruiu accepted D70399: [llvm-readobj/llvm-readelf] - Improve dumping of versioning sections..

LGTM

Mon, Nov 18, 6:34 PM · Restricted Project
ruiu committed rGd0371f473675: Fix component build (authored by ruiu).
Fix component build
Mon, Nov 18, 6:28 PM

Sun, Nov 17

ruiu committed rG909d7bf9a7c5: Fix Windows buildbots (authored by ruiu).
Fix Windows buildbots
Sun, Nov 17, 11:52 PM
ruiu committed rGb11386f9be9b: Make it possible to redirect not only errs() but also outs() (authored by ruiu).
Make it possible to redirect not only errs() but also outs()
Sun, Nov 17, 6:21 PM
ruiu closed D70292: Make it possible to redirect not only errs() but also outs().
Sun, Nov 17, 6:21 PM · Restricted Project

Fri, Nov 15

ruiu added a comment to D70266: [ELF] Fix lld build on Windows/MinGW.

Yeah this is very interesting. This may be a sign that clang is not ABI compatible with GNU on Windows when bitfields are used this way.

Fri, Nov 15, 12:56 AM · Restricted Project
ruiu added inline comments to D70292: Make it possible to redirect not only errs() but also outs().
Fri, Nov 15, 12:55 AM · Restricted Project

Thu, Nov 14

ruiu created D70292: Make it possible to redirect not only errs() but also outs().
Thu, Nov 14, 11:16 PM · Restricted Project
ruiu added a comment to D70287: [LLD][COMMON] Fix Incorrect Stream in LLD ErrorHandler.

I don't know what is going on with your Phabricator account, but I can help you solve your problem. I'll make a patch to add a new parameter to the link() functions so that you can pass not only stderr but also stdout to the functions.

Thu, Nov 14, 10:25 PM · Restricted Project, lld
ruiu added a comment to D70287: [LLD][COMMON] Fix Incorrect Stream in LLD ErrorHandler.

I am calling LLD from within another command line application, and I only want to display output from LLD if there is an actual error, or the user has enabled verbose logging, but several places in LLD use message() during the linking process even if it succeeds, which will output directly to stdout with no way for me to portably redirect it (unless I use freopen, which permanently redirects it to a file, forever, and cannot be restored afterwards). If there needs to be a separate stream for non-error messages, then there should be a way to pass that into the link() function as well, instead of bypassing everything and outputting directly to stdout.

Thu, Nov 14, 7:40 PM · Restricted Project, lld
ruiu added a comment to D70287: [LLD][COMMON] Fix Incorrect Stream in LLD ErrorHandler.

I think this is intended because what message() prints out is not an error message (if it were, you should have used error()) instead.

Thu, Nov 14, 6:44 PM · Restricted Project, lld

Wed, Nov 13

ruiu added inline comments to D69665: [llvm-ar] Fix llvm-ar response file reading on Windows.
Wed, Nov 13, 9:38 PM · Restricted Project
ruiu added inline comments to D70162: Implement /driver, /driver:wdm and /driver:uponly.
Wed, Nov 13, 9:03 PM · Restricted Project
ruiu committed rG000ff301e74b: Warn on /align if used without /driver (authored by ruiu).
Warn on /align if used without /driver
Wed, Nov 13, 8:18 PM
ruiu closed D70163: Warn on /align if used without /driver.
Wed, Nov 13, 8:18 PM · Restricted Project
ruiu committed rGf95ed69641d5: Implement /driver, /driver:wdm and /driver:uponly (authored by ruiu).
Implement /driver, /driver:wdm and /driver:uponly
Wed, Nov 13, 8:11 PM
ruiu closed D70162: Implement /driver, /driver:wdm and /driver:uponly.
Wed, Nov 13, 8:11 PM · Restricted Project
ruiu added a comment to D70162: Implement /driver, /driver:wdm and /driver:uponly.

Looks good, some suggestions on additional things that might be interesting to check below.

Did someone ask for this, or is this just for fun / completeness? (Either's fine of course, just curious)

Wed, Nov 13, 3:47 AM · Restricted Project

Tue, Nov 12

ruiu created D70163: Warn on /align if used without /driver.
Tue, Nov 12, 10:18 PM · Restricted Project
ruiu created D70162: Implement /driver, /driver:wdm and /driver:uponly.
Tue, Nov 12, 10:18 PM · Restricted Project

Fri, Nov 8

ruiu added a comment to D59780: Support Intel Control-flow Enforcement Technology.

This patch is outdated and needs rebasing. I'll rebase, upload it again and then submit.

Fri, Nov 8, 2:49 AM · Restricted Project
ruiu accepted D69650: [ELF] Suggest extern "C" when the definition is mangled while an undefined reference is not.

LGTM

Fri, Nov 8, 2:37 AM · Restricted Project
ruiu accepted D69592: [ELF] Suggest extern "C" when an undefined reference is mangled while the definition is not.

LGTM

Fri, Nov 8, 2:37 AM · Restricted Project
ruiu committed rGf95273f75aaa: Keep symbols passed by -init and -fini (authored by ruiu).
Keep symbols passed by -init and -fini
Fri, Nov 8, 2:13 AM
ruiu closed D69985: Keep symbols passed by -init and -fini.
Fri, Nov 8, 2:13 AM · Restricted Project
ruiu updated the diff for D69985: Keep symbols passed by -init and -fini.
  • simplify test
Fri, Nov 8, 2:13 AM · Restricted Project
ruiu added inline comments to D69985: Keep symbols passed by -init and -fini.
Fri, Nov 8, 2:01 AM · Restricted Project
ruiu updated the diff for D69985: Keep symbols passed by -init and -fini.
  • address review comments
Fri, Nov 8, 2:01 AM · Restricted Project

Thu, Nov 7

ruiu created D69985: Keep symbols passed by -init and -fini.
Thu, Nov 7, 9:47 PM · Restricted Project

Wed, Nov 6

ruiu added inline comments to D69829: [LLD] Extend /section to be compatible to MSVC link.exe.
Wed, Nov 6, 11:28 PM · Restricted Project, lld
ruiu added a comment to D69418: [llvm-ar] Add output option for extract operation.

I'll create a separate patch to address the argument ordering comment.

Wed, Nov 6, 11:28 PM · Restricted Project

Tue, Nov 5

ruiu added a comment to D69418: [llvm-ar] Add output option for extract operation.

So, I think Nick Clifton's modification to not clobber parent directories is a good safeguard, and we should implement the same thing to protect our users. What do you think?

I think disallowing .. and absolute paths of archive members is sufficient. Both --output=../dir and --output=/abs/path can be allowed. The rationale is that --output is and should be controlled by the developer, while paths of archive members are more or less uncontrollable.

We may have already disallowed .. and absolute paths of archive members: error: truncated or malformed archive (string table at long name offset 0not terminated), but the pointer arithmetic in lib/Object/Archive.cpp is a bit complex and I cannot confirm for now.

Tue, Nov 5, 6:38 PM · Restricted Project
ruiu added a comment to D69418: [llvm-ar] Add output option for extract operation.

So, I think Nick Clifton's modification to not clobber parent directories is a good safeguard, and we should implement the same thing to protect our users. What do you think?

Tue, Nov 5, 6:46 AM · Restricted Project
ruiu added a comment to D69744: ELF: Discard .ARM.exidx sections for empty functions instead of misordering them..

LGTM

Tue, Nov 5, 6:46 AM · Restricted Project
ruiu added a comment to D69768: [MinGW] Support --allow-multiple-definition.

As Martin pointed out, I don't think we will have a point release for 8, so if you really need this, please keep this as a local patch.

Tue, Nov 5, 6:10 AM · Restricted Project
ruiu added inline comments to D69829: [LLD] Extend /section to be compatible to MSVC link.exe.
Tue, Nov 5, 5:42 AM · Restricted Project, lld

Fri, Nov 1

ruiu added a comment to D69418: [llvm-ar] Add output option for extract operation.

Full disclosure: I'm coming from a system where there is only one ar tool, and using others isn't really supported. As such, I'm not bothered by adding new features to the tools that don't (yet) exist in GNU tools. If we do that more widely, we'll be held back in improving functionality by whatever the GNU community decide they want to accept. If we're going to start rejecting new options in llvm-ar, because GNU doesn't have/want them, we should start considering whether we should not be adding new options to llvm-objcopy/llvm-objdump/llvm-readelf etc, all of which I believe have options already that aren't in their GNU equivalents. Indeed, llvm-ar does too. It seems relatively unlikely to me that people will switch their binutils piecewise (although I could easily be wrong), so being concerned with one tool and not others seems inconsistent at least.

That all being said, I do agree that we should be careful with option naming. If it's not going to be accepted in other tools, we should be careful what we call the switch. "--output" would be an obvious example of a name that could clash, so discussing with other communities like GNU was the right course of action. I guess if they'd not wanted it, that shouldn't have stopped the option being added (if there was a good use-case for it), but it would have meant perhaps a different switch name that is less likely to clash in the future.

Fri, Nov 1, 4:56 AM · Restricted Project
ruiu updated the diff for D69607: Add a feature to explain why some file gets included to the linker's output.
  • add a test file which I forgot to add in a previous patch
Fri, Nov 1, 3:59 AM · Restricted Project
ruiu added a comment to D69607: Add a feature to explain why some file gets included to the linker's output.

Thanks for the update, I'm happy with the explain output format.

One anomaly that I'm not sure is worth dealing with is the linkerscript GROUP command as used in libc.so

GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) )

I think that these will just end up as input files on the command line. Although they are non-obvious and implicitly included due to the linker script.

Fri, Nov 1, 3:50 AM · Restricted Project
ruiu updated the diff for D69607: Add a feature to explain why some file gets included to the linker's output.
  • address review comments
Fri, Nov 1, 3:50 AM · Restricted Project
ruiu updated the diff for D69607: Add a feature to explain why some file gets included to the linker's output.
  • added tests
  • added a man page entry
  • removed dependent section tracking because dependencies are within the same object file, while this explain feature works in the file granularity
Fri, Nov 1, 3:18 AM · Restricted Project

Thu, Oct 31

ruiu updated the diff for D69607: Add a feature to explain why some file gets included to the linker's output.
  • address review comments
Thu, Oct 31, 2:11 AM · Restricted Project
ruiu added inline comments to D69607: Add a feature to explain why some file gets included to the linker's output.
Thu, Oct 31, 2:11 AM · Restricted Project
ruiu added a comment to D69418: [llvm-ar] Add output option for extract operation.

Thank you very much for adding it to GNU ar! Great work.

Thu, Oct 31, 1:53 AM · Restricted Project
ruiu added inline comments to D69650: [ELF] Suggest extern "C" when the definition is mangled while an undefined reference is not.
Thu, Oct 31, 1:44 AM · Restricted Project
ruiu updated the summary of D69607: Add a feature to explain why some file gets included to the linker's output.
Thu, Oct 31, 12:39 AM · Restricted Project
ruiu added inline comments to D69607: Add a feature to explain why some file gets included to the linker's output.
Thu, Oct 31, 12:30 AM · Restricted Project
ruiu updated the diff for D69607: Add a feature to explain why some file gets included to the linker's output.
  • address vreview comments
Thu, Oct 31, 12:21 AM · Restricted Project
ruiu added inline comments to D69607: Add a feature to explain why some file gets included to the linker's output.
Thu, Oct 31, 12:11 AM · Restricted Project
ruiu updated the summary of D69607: Add a feature to explain why some file gets included to the linker's output.
Thu, Oct 31, 12:02 AM · Restricted Project

Wed, Oct 30

ruiu added a comment to D69607: Add a feature to explain why some file gets included to the linker's output.

I agree that having the most common case built in is valuable. Unless there is an analysis program that is shipped with the linker I suspect that the majority of users won't want to write their own algorithm.
Looking at the example output:

'(--entry option)' uses '_start'
'/usr/lib/x86_64-linux-gnu/crt1.o' uses 'main'
'lld.cpp.o' uses 'lld::elf::link(llvm::ArrayRef<char const*>)'
'lib/liblldELF.a(Driver.cpp.o)' uses 'llvm::object::Archive::create()'
'lib/libLLVMObject.a(Archive.cpp.o)' uses 'llvm::Expected<bool>::operator bool()'
'lib/libLLVMPasses.a(PassBuilder.cpp.o)' uses 'llvm::InlinerPass::~InlinerPass()'
'lib/libLLVMipo.a(Inliner.cpp.o)'

I'd be tempted to start with the last object in the chain that is unconditionally present on the command line. For example _start, crt1.o, etc. will always be present and most likely not visible to the user as they have been added by the compiler driver. In this case I'd expect lld.cpp.o to be the first entry in the diagnostic.

Although it is implicit, it may be worth stating the dependency as:

'lld.cpp.o' uses 'lld::elf::link(llvm::ArrayRef<char const*>)' defined in 'lib/liblldELF.a(Driver.cpp.o)'

It would make it a bit more verbose, but everything is on one line.

Wed, Oct 30, 11:53 PM · Restricted Project
ruiu updated the diff for D69607: Add a feature to explain why some file gets included to the linker's output.
  • address review comments
Wed, Oct 30, 11:53 PM · Restricted Project
ruiu accepted D69572: [ELF][test] Change referenceds of %T to %t.dir.

LGTM

Wed, Oct 30, 2:12 AM · Restricted Project
ruiu created D69607: Add a feature to explain why some file gets included to the linker's output.
Wed, Oct 30, 12:40 AM · Restricted Project

Tue, Oct 29

ruiu accepted D69594: Warn when an output section name is longer than 8 characters.

LGTM

Tue, Oct 29, 6:58 PM · Restricted Project
ruiu accepted D69600: [WebAssembly][lld] Fix for static linking of PIC code.

LGTM

Tue, Oct 29, 6:48 PM · Restricted Project

Mon, Oct 28

ruiu added a comment to D69294: [LLD][ELF] Support --[no-]mmap-output-file with F_no_mmap.

Feel free to submit.

Mon, Oct 28, 9:58 PM · lld, Restricted Project

Sun, Oct 27

ruiu accepted D69458: lld/COFF: Simplify getOutputPath() using sys::path functions..

LGTM

Sun, Oct 27, 7:19 PM · Restricted Project
ruiu added a comment to D69418: [llvm-ar] Add output option for extract operation.

I posted a GNU ar patch yesterday https://sourceware.org/ml/binutils/2019-10/msg00193.html . If they accept the name --output, we can proceed with this patch.

Sun, Oct 27, 7:09 PM · Restricted Project

Fri, Oct 25

ruiu added a comment to D69418: [llvm-ar] Add output option for extract operation.

I think I'm leaning toward not adding this option at the moment for the compatibility reason. IIUC, llvm-ar was created because otherwise it would have been hard to create archives containing symbols from bitcode files, and except that feature, it was intended to be a drop-in replacement. If you land this patch and start depending on the feature, you can't easily go back to the other ar commands.

Fri, Oct 25, 6:45 AM · Restricted Project

Thu, Oct 24

ruiu accepted D69294: [LLD][ELF] Support --[no-]mmap-output-file with F_no_mmap.

LGTM

Thu, Oct 24, 7:52 PM · lld, Restricted Project
ruiu accepted D69313: Handle more crt*.o filename variants..

LGTM

Thu, Oct 24, 1:01 PM · Restricted Project
ruiu added inline comments to D69313: Handle more crt*.o filename variants..
Thu, Oct 24, 12:30 PM · Restricted Project
ruiu added inline comments to D69313: Handle more crt*.o filename variants..
Thu, Oct 24, 11:32 AM · Restricted Project
ruiu added inline comments to D69313: Handle more crt*.o filename variants..
Thu, Oct 24, 11:32 AM · Restricted Project
ruiu added a comment to D69313: Handle more crt*.o filename variants..

Could you add a test?

Thu, Oct 24, 10:35 AM · Restricted Project

Wed, Oct 23

ruiu added a comment to D69343: [llvm-ar] Allow MRI scripts to be passed via command line argument .

Honestly I'd try to avoid adding a new command line option to llvm-ar. Especially, in this case there are several easy workaround as follows:

Wed, Oct 23, 9:55 AM · Restricted Project

Tue, Oct 22

ruiu added inline comments to D69313: Handle more crt*.o filename variants..
Tue, Oct 22, 3:45 PM · Restricted Project
ruiu added inline comments to D69313: Handle more crt*.o filename variants..
Tue, Oct 22, 2:12 PM · Restricted Project
ruiu accepted D69295: Optimize SHA1 implementation.

LGTM

Tue, Oct 22, 1:35 PM · Restricted Project
ruiu added a comment to D69293: [Support] Add in memory flag for FileOutputBuffer.

Maybe this should be merged with https://reviews.llvm.org/D69294. Since we are moving to a single repository that contains both llvm and lld, we no longer have to split a commit at svn repo boundaries. Since this flag will be used only by lld at least for a while, it feels more natural to commit this and the other one as a single commit.

Tue, Oct 22, 12:02 PM · Restricted Project
ruiu added inline comments to D69313: Handle more crt*.o filename variants..
Tue, Oct 22, 11:55 AM · Restricted Project
ruiu added inline comments to D69293: [Support] Add in memory flag for FileOutputBuffer.
Tue, Oct 22, 11:53 AM · Restricted Project
ruiu added a comment to D69294: [LLD][ELF] Support --[no-]mmap-output-file with F_no_mmap.

I should have reviewed this one first, sorry. I'm a little sad that BtrFS behaves poorly under a certain condition, and I feel like the filesystem is at fault than the linker, but I'm fine with actually supporting -no-mmap-output-file option as a workaround. That's practical and easy to implement.

Tue, Oct 22, 11:46 AM · lld, Restricted Project
ruiu added a comment to D69295: Optimize SHA1 implementation.

This looks good, though I'm not an expert in this area.

Tue, Oct 22, 11:43 AM · Restricted Project
ruiu added a comment to D69293: [Support] Add in memory flag for FileOutputBuffer.

Could you explain a little bit about the motivation to add -no-mmap-output-file option to lld?

Tue, Oct 22, 11:34 AM · Restricted Project

Oct 20 2019

ruiu accepted D69198: [LLD] [COFF] Use the local dwarf code instead of Symbolizer for resolving code locations. NFC..

LGTM

Oct 20 2019, 8:02 PM · Restricted Project
ruiu accepted D69197: [LLD] Move duplicated dwarf parsing code to the Common library. NFC..

LGTM

Oct 20 2019, 7:53 PM · Restricted Project

Oct 18 2019

ruiu added a comment to D68975: [LLD] [COFF] Try to report source locations for duplicate symbols.

Ah, that's true. How about something like "Used if DWARF debug info is used (which is not common)"?

Oct 18 2019, 12:34 AM · Restricted Project

Oct 17 2019

ruiu committed rG9a5ad9bd5ad1: Update release notes (authored by ruiu).
Update release notes
Oct 17 2019, 11:12 PM