arichardson (Alexander Richardson)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 4 2015, 4:18 PM (111 w, 1 d)

Recent Activity

Fri, Oct 20

arichardson added inline comments to D39062: [MIPS] Don't assert when attempting to expand ld/sd macro with symbol reference.
Fri, Oct 20, 5:14 AM

Wed, Oct 18

arichardson created D39062: [MIPS] Don't assert when attempting to expand ld/sd macro with symbol reference.
Wed, Oct 18, 11:12 AM

Tue, Oct 17

arichardson added a comment to D39003: [mips] Fix analyzeBranch to handle debug data.

With this patch applied I can successfully compile the source file that was crashing. Thanks!

Tue, Oct 17, 8:27 AM
arichardson committed rL315988: Fix shared build of liblldCommon.so on Linux.
Fix shared build of liblldCommon.so on Linux
Tue, Oct 17, 3:39 AM

Sun, Oct 15

arichardson committed rL315871: Convert clang::LangAS to a strongly typed enum.
Convert clang::LangAS to a strongly typed enum
Sun, Oct 15, 11:48 AM
arichardson closed D38816: Convert clang::LangAS to a strongly typed enum by committing rL315871: Convert clang::LangAS to a strongly typed enum.
Sun, Oct 15, 11:48 AM

Fri, Oct 13

arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Fri, Oct 13, 3:18 PM
arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Fri, Oct 13, 9:41 AM
arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Fri, Oct 13, 9:26 AM
arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Fri, Oct 13, 8:39 AM
arichardson updated the diff for D38816: Convert clang::LangAS to a strongly typed enum.
  • Keep old behaviour for clang_getAddressSpace()
  • renamed to getLangASFromTargetAS()
  • rebased on latest trunk
Fri, Oct 13, 8:30 AM

Thu, Oct 12

arichardson planned changes to D38816: Convert clang::LangAS to a strongly typed enum.
Thu, Oct 12, 3:28 PM
arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Thu, Oct 12, 9:11 AM
arichardson updated the diff for D38816: Convert clang::LangAS to a strongly typed enum.

Removed the additional namespace

Thu, Oct 12, 6:18 AM

Wed, Oct 11

arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Wed, Oct 11, 2:39 PM
arichardson created D38816: Convert clang::LangAS to a strongly typed enum.
Wed, Oct 11, 12:59 PM

Fri, Oct 6

arichardson committed rL315073: [ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and….
[ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and…
Fri, Oct 6, 9:17 AM
arichardson closed D38614: [ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and R_MIPS_TLS_GOTTPREL by committing rL315073: [ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and….
Fri, Oct 6, 9:17 AM · lld
arichardson updated the diff for D38614: [ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and R_MIPS_TLS_GOTTPREL.

Added a test case.

Fri, Oct 6, 4:02 AM · lld
arichardson updated the summary of D38614: [ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and R_MIPS_TLS_GOTTPREL.
Fri, Oct 6, 3:16 AM · lld
arichardson created D38614: [ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and R_MIPS_TLS_GOTTPREL.
Fri, Oct 6, 3:14 AM · lld

Thu, Oct 5

arichardson committed rL315038: [ELF] Add missing REQUIRES: mips to the test added in r315035.
[ELF] Add missing REQUIRES: mips to the test added in r315035
Thu, Oct 5, 4:50 PM
arichardson committed rL315036: [ELF] Don't crash when parsing a file with out-of-bounds version references.
[ELF] Don't crash when parsing a file with out-of-bounds version references
Thu, Oct 5, 4:30 PM
arichardson committed rL315035: [ELF] Don't crash when parsing a file with external version definition….
[ELF] Don't crash when parsing a file with external version definition…
Thu, Oct 5, 4:30 PM
arichardson closed D38397: [ELF] Don't crash when parsing a file with external version definition references by committing rL315035: [ELF] Don't crash when parsing a file with external version definition….
Thu, Oct 5, 4:30 PM · lld
arichardson updated the diff for D38397: [ELF] Don't crash when parsing a file with external version definition references.

fix typos in test case

Thu, Oct 5, 8:05 AM · lld
arichardson updated the diff for D38397: [ELF] Don't crash when parsing a file with external version definition references.

The issue that caused the corrupted input file appears to be fixed by https://reviews.llvm.org/D38579 and https://reviews.llvm.org/D38580. However we should still never access out-of-bounds memory, so turned this into a hard error

Thu, Oct 5, 6:02 AM · lld

Mon, Oct 2

arichardson added a comment to D38397: [ELF] Don't crash when parsing a file with external version definition references.

I was able to link telnetd with these changes, possibly it doesn't use any of the symbols with the external version reference.

Mon, Oct 2, 4:59 AM · lld

Fri, Sep 29

arichardson accepted D37476: [mips] Partially fix PR34391.

This fixes the crashes we had when compiling some CheriBSD kernel assembly.

Fri, Sep 29, 5:18 AM
arichardson abandoned D38398: [MIPS] Don't crash when parsing a subu with an undefined symbol.

Ah I hadn't seen that one. Indeed that is a lot better.

Fri, Sep 29, 5:16 AM
arichardson created D38398: [MIPS] Don't crash when parsing a subu with an undefined symbol.
Fri, Sep 29, 4:47 AM
arichardson created D38397: [ELF] Don't crash when parsing a file with external version definition references.
Fri, Sep 29, 4:05 AM · lld

Mon, Sep 25

arichardson added a comment to D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.
In D38167#879089, @ruiu wrote:

Well, this is not a bug, so this patch is not a fix but a workaround for existing FreeBSD/MIPS kernel's issue.

So the question is whether or not the issue is so significant and persistent that we need to extend our ABI to make a promise that lld fills gaps in .init/.fini sections with NOP bytes. I think the answer is no in order to make it simple. We shouldn't make any assumption on gap bytes (we shouldn't even assume that they are null or trap instructions) just like we shouldn't use uninitialized variables in C++.

Mon, Sep 25, 6:34 AM · lld

Sep 22 2017

arichardson added a comment to D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.
In D38167#879065, @ruiu wrote:

At least for x86, null bytes are not nop instructions, so it feels like it just happened to work for MIPS but it wasn't really guaranteed. How did you get a gap in .fini section?

Sep 22 2017, 11:49 AM · lld
arichardson added a comment to D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.
In D38167#879015, @ruiu wrote:

I wonder whether this is a new issue or not. lld used to leave the gap in .init/.fini (or any other sections) as null bytes, so unless your processor handles null bytes as nop instructions, it didn't work before. So, this issue existed before lld started filling gaps with trap instructions. Is my understanding correct?

Sep 22 2017, 11:30 AM · lld
arichardson committed rL313970: [obj2yaml] Don't crash for input files without symbol table.
[obj2yaml] Don't crash for input files without symbol table
Sep 22 2017, 2:32 AM
arichardson closed D38080: [obj2yaml] Don't crash for input files without symbol table by committing rL313970: [obj2yaml] Don't crash for input files without symbol table.
Sep 22 2017, 2:32 AM
arichardson created D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.
Sep 22 2017, 2:03 AM · lld
arichardson committed rL313968: [mips] clang-format MipsTargetMachine.cpp.
[mips] clang-format MipsTargetMachine.cpp
Sep 22 2017, 1:53 AM

Sep 20 2017

arichardson created D38080: [obj2yaml] Don't crash for input files without symbol table.
Sep 20 2017, 6:41 AM

Sep 19 2017

arichardson raised a concern with rL311981: Use class to pass information about executable name.

This commit caused https://bugs.llvm.org/show_bug.cgi?id=34671

Sep 19 2017, 9:05 AM

Sep 15 2017

arichardson added a comment to D31528: [ELF][MIPS] Multi-GOT implementation.

We have been using this patch successfully for building CheriBSD (FreeBSD running on the CHERI CPU) for the last few months. Without it we can't build the base system even if we use -mxgot for every object.
The same problem happens when building upstream FreeBSD for MIPS64 so it would be great if this patch could be merged before the next LLD release.

Sep 15 2017, 4:56 PM · lld

Aug 24 2017

arichardson added inline comments to D37077: [mips][Release Notes] Release notes for 5.0.
Aug 24 2017, 3:00 AM

Aug 15 2017

arichardson added 1 commit(s) for D35874: [MIPS] Implement support for -mstack-alignment.: rL310891: [MIPS] Implement support for -mstack-alignment..
Aug 15 2017, 1:56 AM
arichardson added an edge to rL310891: [MIPS] Implement support for -mstack-alignment.: D35874: [MIPS] Implement support for -mstack-alignment..
Aug 15 2017, 1:56 AM
arichardson removed 1 commit(s) for D35874: [MIPS] Implement support for -mstack-alignment.: rL310891: [MIPS] Implement support for -mstack-alignment..
Aug 15 2017, 1:56 AM
arichardson removed an edge from rL310891: [MIPS] Implement support for -mstack-alignment.: D35874: [MIPS] Implement support for -mstack-alignment..
Aug 15 2017, 1:56 AM

Jun 21 2017

arichardson created D34445: Link against libcompat on FreeBSD if re_comp is used.
Jun 21 2017, 6:01 AM

Jun 2 2017

arichardson added a comment to D32795: Make the Twine pretty-printer work with GDB 7.11.

I don't have commit access, could you commit for me please?

Jun 2 2017, 2:34 PM

May 31 2017

arichardson closed D33670: Fix crash when processing relocations in .eh_frame.

Submitted as rL304260

May 31 2017, 5:40 AM
arichardson added an edge to rL304260: Fix crash when processing relocations in .eh_frame.: D33670: Fix crash when processing relocations in .eh_frame.
May 31 2017, 5:39 AM
arichardson added 1 commit(s) for D33670: Fix crash when processing relocations in .eh_frame: rL304260: Fix crash when processing relocations in .eh_frame..
May 31 2017, 5:39 AM

May 30 2017

arichardson added a comment to D33670: Fix crash when processing relocations in .eh_frame.

I don't have commit access, could you commit for me please?

May 30 2017, 6:25 AM
arichardson added inline comments to D33670: Fix crash when processing relocations in .eh_frame.
May 30 2017, 5:28 AM
arichardson updated the diff for D33670: Fix crash when processing relocations in .eh_frame.

Simplified the test case

May 30 2017, 5:27 AM
arichardson created D33670: Fix crash when processing relocations in .eh_frame.
May 30 2017, 5:04 AM

May 23 2017

arichardson added a comment to D32425: [mips] Make checks in CodeGen/mips-varargs.c less fragile.

I don't have commit access, could you commit for me please?

May 23 2017, 1:56 AM

May 17 2017

arichardson added a comment to D33271: lit: allow glob patterns as path arguments.

The last time I tried using a glob on the source directory it did not work for me for some reason. It works now so maybe I was using llvm-lit from the wrong build directory.
However, I still think this patch is useful because it means I don't have to type the full path to the source directory.

May 17 2017, 5:57 AM
arichardson created D33271: lit: allow glob patterns as path arguments.
May 17 2017, 3:37 AM

May 6 2017

arichardson updated the diff for D32425: [mips] Make checks in CodeGen/mips-varargs.c less fragile.

Used -enable-var-scope to ensure we don't reuse a capture from a preivous function

May 6 2017, 6:12 AM
arichardson added a comment to D32488: [ELF] Improve error message for incompatible section types.

I don't have commit access, could you please commit for me?

May 6 2017, 5:52 AM · lld
arichardson updated the diff for D32488: [ELF] Improve error message for incompatible section types.

removed object::

May 6 2017, 5:52 AM · lld

May 3 2017

arichardson added inline comments to D32795: Make the Twine pretty-printer work with GDB 7.11.
May 3 2017, 3:33 PM
arichardson added inline comments to D32488: [ELF] Improve error message for incompatible section types.
May 3 2017, 5:13 AM · lld
arichardson updated the diff for D32488: [ELF] Improve error message for incompatible section types.

Remove helper function and call getELFSectionTypeName directly

May 3 2017, 5:12 AM · lld
arichardson created D32795: Make the Twine pretty-printer work with GDB 7.11.
May 3 2017, 4:33 AM

May 2 2017

arichardson closed D32587: Add llvm::object::getELFSectionTypeName().
May 2 2017, 10:32 AM
arichardson added an edge to rL301921: Add llvm::object::getELFSectionTypeName().: D32587: Add llvm::object::getELFSectionTypeName().
May 2 2017, 10:31 AM
arichardson added 1 commit(s) for D32587: Add llvm::object::getELFSectionTypeName(): rL301921: Add llvm::object::getELFSectionTypeName()..
May 2 2017, 10:31 AM
arichardson updated the diff for D32488: [ELF] Improve error message for incompatible section types.

Adapted to D32587 changes

May 2 2017, 3:46 AM · lld
arichardson added a comment to D32587: Add llvm::object::getELFSectionTypeName().

I don't have commit access, could you please commit for me?

May 2 2017, 2:36 AM

May 1 2017

arichardson updated the diff for D32587: Add llvm::object::getELFSectionTypeName().

return "Unknown" in the default case

May 1 2017, 3:17 AM

Apr 28 2017

arichardson added inline comments to D32587: Add llvm::object::getELFSectionTypeName().
Apr 28 2017, 3:14 AM
arichardson updated the diff for D32488: [ELF] Improve error message for incompatible section types.

Addressed review comments

Apr 28 2017, 3:14 AM · lld
arichardson updated the diff for D32587: Add llvm::object::getELFSectionTypeName().

Used a macro instead

Apr 28 2017, 3:12 AM

Apr 27 2017

arichardson updated the diff for D32488: [ELF] Improve error message for incompatible section types.

Rebased on https://reviews.llvm.org/D32587

Apr 27 2017, 4:02 AM · lld
arichardson added a dependent revision for D32587: Add llvm::object::getELFSectionTypeName(): D32488: [ELF] Improve error message for incompatible section types.
Apr 27 2017, 4:00 AM
arichardson added a dependency for D32488: [ELF] Improve error message for incompatible section types: D32587: Add llvm::object::getELFSectionTypeName().
Apr 27 2017, 4:00 AM · lld
arichardson created D32587: Add llvm::object::getELFSectionTypeName().
Apr 27 2017, 4:00 AM

Apr 25 2017

arichardson added a comment to D32484: [ELF] Improve error message for incompatible section flags.

Could you commit for me? I don't have commit access.

Apr 25 2017, 9:06 AM · lld
arichardson updated the summary of D32484: [ELF] Improve error message for incompatible section flags.
Apr 25 2017, 9:06 AM · lld
arichardson added inline comments to D32488: [ELF] Improve error message for incompatible section types.
Apr 25 2017, 9:02 AM · lld
arichardson updated the diff for D32484: [ELF] Improve error message for incompatible section flags.

Make error message more like other error messages

Apr 25 2017, 8:54 AM · lld
arichardson updated the diff for D32488: [ELF] Improve error message for incompatible section types.

change error message format and remove macro

Apr 25 2017, 8:39 AM · lld
arichardson updated the diff for D32488: [ELF] Improve error message for incompatible section types.

Start message with lower case letter

Apr 25 2017, 8:03 AM · lld
arichardson updated the diff for D32484: [ELF] Improve error message for incompatible section flags.

Start with lowercase letter and remove full stop.

Apr 25 2017, 8:01 AM · lld
arichardson updated the diff for D32484: [ELF] Improve error message for incompatible section flags.

Add full stop at end of message.

Apr 25 2017, 7:47 AM · lld
arichardson updated the diff for D32484: [ELF] Improve error message for incompatible section flags.

changed error message

Apr 25 2017, 7:46 AM · lld
arichardson created D32488: [ELF] Improve error message for incompatible section types.
Apr 25 2017, 7:32 AM · lld
arichardson added a comment to D32484: [ELF] Improve error message for incompatible section flags.

It seems both old and new way will not show proper location if section is coming from achieve object ?
We have std::string lld::toString(const InputFile *F) that can return "foo.a(bar.o)" for such case.

Also original implementation and one from this patch does not show where Sec is coming from.
And "for .bar" part probably does not make much sense because its already stated "with others with the same name "

I would do message more explicit, I am thinking about something like next format:

 Section .foo has flags incompatible with others with the same name:
>>> defined in foo.a(bar.o) with flags 0x403
>>> defined in zed.o with flags 0x3

Rui, what do you think ?

I think that output format looks better but I don't see how we can determine whichinput file the OutputSection flags are derived from as they are a bitwise or of multiple files.
I guess one option is adding list of InputSections that caused the Flags field to be updated (which would be empty if Sec->Flags == Sec->Sections[0]->Flags)?

Apr 25 2017, 6:05 AM · lld
arichardson created D32484: [ELF] Improve error message for incompatible section flags.
Apr 25 2017, 5:32 AM · lld

Apr 24 2017

arichardson updated subscribers of D32425: [mips] Make checks in CodeGen/mips-varargs.c less fragile.
Apr 24 2017, 7:18 AM
arichardson set the repository for D32425: [mips] Make checks in CodeGen/mips-varargs.c less fragile to rL LLVM.
Apr 24 2017, 3:49 AM
arichardson created D32425: [mips] Make checks in CodeGen/mips-varargs.c less fragile.
Apr 24 2017, 3:48 AM

Apr 14 2017

arichardson created D32077: [ELF] Remove unused member [NFC].
Apr 14 2017, 2:24 AM · lld
arichardson updated the diff for D31984: [ELF] LinkerScript: Don't assign zero to all regular symbols.

Could you commit for me please? I don't have commit access.

Apr 14 2017, 2:13 AM

Apr 12 2017

arichardson updated the diff for D31984: [ELF] LinkerScript: Don't assign zero to all regular symbols.
Apr 12 2017, 3:30 PM
arichardson added a comment to D31984: [ELF] LinkerScript: Don't assign zero to all regular symbols.

This happens when using the following linker scripts: https://github.com/CTSRD-CHERI/cheribsd/blob/master/lib/libc_cheri/sandbox.ld and https://github.com/CTSRD-CHERI/cherios/blob/master/ldscripts/sandbox.ld and these to work fine with the ancient (2007) FreeBSD BFD version.
The crash was discovered when we tried to link files using sandbox.ld with LLD instead of BFD. I just tried running the testcase with the FreeBSD BFD and you are right that it rejects it. I am not entirely sure what is different in the test case compared to sandbox.ld that would cause it to be rejected.

Apr 12 2017, 2:54 PM
arichardson created D31984: [ELF] LinkerScript: Don't assign zero to all regular symbols.
Apr 12 2017, 11:06 AM
arichardson added a comment to D31528: [ELF][MIPS] Multi-GOT implementation.
In D31528#715906, @ruiu wrote:

This is not your fault, but I have to say that this MIPS GOT layout is very odd, too different from other architectures, and too complicated. I want to avoid supporting this unless I'm convinced that it is absolutely necessary. It seems to me that MIPS needs a clean, common new ABI. Only the MIPS ABI imposes a lot of restrictions on the size of GOT sections and the order of GOT section members, even though MIPS as a processor is an ordinary RISC ISA. This change would really hurt maintainability of LLD which I already found some MIPS-specific behavior is hard to keep it right when editing code for all the other architectures.

I wonder what is the performance penalty you would have to pay when you use the -mxgot option. With the option, you'll need three instructions as opposed to a single instruction to access an GOT entry. Does that actually make observable difference in performance?

Apr 12 2017, 6:16 AM · lld