arichardson (Alexander Richardson)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 4 2015, 4:18 PM (123 w, 3 d)

Recent Activity

Sun, Jan 14

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

As this patch is essential for being able to link any of our code I did some bisection and it turns out that the tests start failing after rL320472 (D38361).

Sun, Jan 14, 7:26 AM · lld

Wed, Jan 10

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

I would be really great if this patch could be added to LLD soon. I believe this is the last change needed before we can use LLD to build the whole FreeBSD MIPS base system.

Wed, Jan 10, 1:02 PM · lld

Mon, Jan 8

arichardson created D41821: [MIPS] Disassemble the 0xefefefef trap padding used by LLD.
Mon, Jan 8, 6:51 AM

Mon, Dec 18

arichardson added a comment to D41349: Thread MCSubtargetInfo through Target::createMCAsmBackend.

This will also be very useful for CHERI clang. It will allow me to remove some hacks I had to add in order to get information from the subtarget in the assembler backend.

Mon, Dec 18, 6:45 AM

Dec 12 2017

arichardson added a comment to D41114: Look through address space casts in IsConstantOffsetFromGlobal().

True, I didn't think of that. For us this will almost always work without adding an additional offset but I am not sure what the correct way to fix this is.

Dec 12 2017, 3:00 PM
arichardson created D41114: Look through address space casts in IsConstantOffsetFromGlobal().
Dec 12 2017, 8:04 AM
arichardson added a comment to D41046: [ELF] Make overlapping output sections an error.
In D41046#952044, @ruiu wrote:

The amount of new code seems a bit overwhelming. I wonder if there's a better and simpler way of doing it. In what condition do sections overlap?

We do have a check if "." doesn't rewind. Doesn't it work as a prevention for section overlapping?

Dec 12 2017, 1:57 AM

Dec 11 2017

arichardson committed rL320416: [ELF] When a relocation is out of range print the value and the range.
[ELF] When a relocation is out of range print the value and the range
Dec 11 2017, 12:48 PM
arichardson committed rLLD320416: [ELF] When a relocation is out of range print the value and the range.
[ELF] When a relocation is out of range print the value and the range
Dec 11 2017, 12:48 PM
arichardson closed D40962: [ELF] When a relocation is out of range print the value and the range by committing rLLD320416: [ELF] When a relocation is out of range print the value and the range.
Dec 11 2017, 12:48 PM
arichardson closed D40962: [ELF] When a relocation is out of range print the value and the range by committing rL320416: [ELF] When a relocation is out of range print the value and the range.
Dec 11 2017, 12:48 PM
arichardson added a comment to D41046: [ELF] Make overlapping output sections an error.

Speed up lld invocation in test/ELF/many-alloc-sections.s lld invocation from 290s to <1s by not checking empty sections

I think we already had patches for that purpose before (I can be missing details, though I mean general idea was to avoid overlapping things when linker script is used,
probably it were PT_LOADs, but anyways).
And I think last time we stopped on a point that we are not going to stop users from breaking output if they want to do that, because with linker script it is easy to break everything.

That position can be revisited probably, if you have good arguments for that :)

Dec 11 2017, 9:57 AM
arichardson updated the diff for D40962: [ELF] When a relocation is out of range print the value and the range.

Updated error message
Simplified ternary expression

Dec 11 2017, 9:54 AM
arichardson added inline comments to D40962: [ELF] When a relocation is out of range print the value and the range.
Dec 11 2017, 9:54 AM
arichardson added inline comments to D40962: [ELF] When a relocation is out of range print the value and the range.
Dec 11 2017, 9:49 AM
arichardson added inline comments to D40962: [ELF] When a relocation is out of range print the value and the range.
Dec 11 2017, 9:43 AM
arichardson added a comment to D31557: [mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el..

I have added a similar patch to our CHERI clang fork and we have been using IAS to compile FreeBSD&CheriBSD for n64 for a while now.
I believe we have a branch where n32 almost works but for now we could just add -no-integrated-as in that case.

Dec 11 2017, 1:47 AM

Dec 9 2017

arichardson updated the diff for D41046: [ELF] Make overlapping output sections an error.

Speed up lld invocation in test/ELF/many-alloc-sections.s lld invocation from 290s to <1s by not checking empty sections

Dec 9 2017, 1:27 AM
arichardson created D41046: [ELF] Make overlapping output sections an error.
Dec 9 2017, 1:11 AM

Dec 8 2017

arichardson committed rLLD320147: Print the bad value and required alignment for unaligned relocations.
Print the bad value and required alignment for unaligned relocations
Dec 8 2017, 6:54 AM
arichardson committed rL320147: Print the bad value and required alignment for unaligned relocations.
Print the bad value and required alignment for unaligned relocations
Dec 8 2017, 6:53 AM
arichardson closed D40963: Print the bad value and required alignment for unaligned relocations by committing rL320147: Print the bad value and required alignment for unaligned relocations.
Dec 8 2017, 6:53 AM
arichardson added inline comments to D40962: [ELF] When a relocation is out of range print the value and the range.
Dec 8 2017, 5:37 AM
arichardson added inline comments to D40962: [ELF] When a relocation is out of range print the value and the range.
Dec 8 2017, 1:28 AM
arichardson updated the diff for D40962: [ELF] When a relocation is out of range print the value and the range.

Addressed review comments

Dec 8 2017, 1:25 AM

Dec 7 2017

arichardson abandoned D39548: [ELF] Set the section size on the section start symbols.

Will keep this as a CHERI specific patch in our fork instead

Dec 7 2017, 9:09 AM
arichardson created D40963: Print the bad value and required alignment for unaligned relocations.
Dec 7 2017, 9:08 AM
arichardson created D40962: [ELF] When a relocation is out of range print the value and the range.
Dec 7 2017, 9:07 AM
arichardson committed rL320058: Fix the test from r320056 on Windows.
Fix the test from r320056 on Windows
Dec 7 2017, 8:42 AM
arichardson committed rLLD320058: Fix the test from r320056 on Windows.
Fix the test from r320056 on Windows
Dec 7 2017, 8:42 AM
arichardson committed rLLD320056: [ELF][mips] Print the full file path for files with incompatible ISA.
[ELF][mips] Print the full file path for files with incompatible ISA
Dec 7 2017, 8:09 AM
arichardson committed rL320056: [ELF][mips] Print the full file path for files with incompatible ISA.
[ELF][mips] Print the full file path for files with incompatible ISA
Dec 7 2017, 8:09 AM
arichardson closed D40958: [ELF][mips] Print the full file path for files with incompatible ISA by committing rLLD320056: [ELF][mips] Print the full file path for files with incompatible ISA.
Dec 7 2017, 8:09 AM
arichardson closed D40958: [ELF][mips] Print the full file path for files with incompatible ISA by committing rL320056: [ELF][mips] Print the full file path for files with incompatible ISA.
Dec 7 2017, 8:09 AM
arichardson updated the diff for D40958: [ELF][mips] Print the full file path for files with incompatible ISA.

Run git-clang-format

Dec 7 2017, 8:00 AM
arichardson created D40958: [ELF][mips] Print the full file path for files with incompatible ISA.
Dec 7 2017, 7:58 AM

Nov 30 2017

arichardson added a comment to D40659: Fix the MIPS baremetal build.

Please correct this commit. This header is also present on NetBSD/MIPS.

We can add

|| defined(__NetBSD__)

What about FreeBSD, is it the same?

It's also unclear for me what is 'bare metal' about. FreeBSD should have the same header.

Nov 30 2017, 3:39 PM
arichardson added a comment to D40659: Fix the MIPS baremetal build.

I checked Linux, FreeBSD and MacOS and only found it one Linux so I assumed it was Linux specific (especially since the commit that introduced it (r228767) only mentions Linux.
Should I just add || defined(__NetBSD__) or are there any other systems that might have it?

Nov 30 2017, 3:08 PM
arichardson committed rCRT319455: Fix the MIPS baremetal build.
Fix the MIPS baremetal build
Nov 30 2017, 10:37 AM
arichardson committed rL319455: Fix the MIPS baremetal build.
Fix the MIPS baremetal build
Nov 30 2017, 10:37 AM
arichardson closed D40659: Fix the MIPS baremetal build by committing rL319455: Fix the MIPS baremetal build.
Nov 30 2017, 10:37 AM
arichardson created D40659: Fix the MIPS baremetal build.
Nov 30 2017, 9:58 AM

Nov 20 2017

arichardson committed rL318656: [ELF] Fix rewriting of --sysroot in reproducer tars.
[ELF] Fix rewriting of --sysroot in reproducer tars
Nov 20 2017, 7:50 AM
arichardson closed D40125: [ELF] Fix rewriting of --sysroot in reproducer tars by committing rL318656: [ELF] Fix rewriting of --sysroot in reproducer tars.
Nov 20 2017, 7:50 AM
arichardson committed rL318655: [ELF] Fall back to search dirs for linker scripts specified with -T.
[ELF] Fall back to search dirs for linker scripts specified with -T
Nov 20 2017, 7:43 AM
arichardson closed D40129: [ELF] Fall back to search dirs for linker scripts specified with -T by committing rL318655: [ELF] Fall back to search dirs for linker scripts specified with -T.
Nov 20 2017, 7:43 AM
arichardson committed rL318653: [ELF][MIPS] Fix crash in LLD when linking code that needs PIC thunks.
[ELF][MIPS] Fix crash in LLD when linking code that needs PIC thunks
Nov 20 2017, 7:39 AM
arichardson closed D40174: [ELF][MIPS] Fix crash in LLD when linking code that needs PIC thunks by committing rL318653: [ELF][MIPS] Fix crash in LLD when linking code that needs PIC thunks.
Nov 20 2017, 7:39 AM

Nov 17 2017

arichardson added inline comments to D40174: [ELF][MIPS] Fix crash in LLD when linking code that needs PIC thunks.
Nov 17 2017, 8:53 AM
arichardson added inline comments to D40129: [ELF] Fall back to search dirs for linker scripts specified with -T.
Nov 17 2017, 8:52 AM
arichardson updated the diff for D40129: [ELF] Fall back to search dirs for linker scripts specified with -T.

addressed reviews

Nov 17 2017, 6:29 AM
arichardson updated the diff for D40125: [ELF] Fix rewriting of --sysroot in reproducer tars.
  • merged with the other cases
  • added both --sysroot=<path> and --sysroot <path> to the test
Nov 17 2017, 6:04 AM
arichardson added inline comments to D40125: [ELF] Fix rewriting of --sysroot in reproducer tars.
Nov 17 2017, 6:03 AM
arichardson created D40174: [ELF][MIPS] Fix crash in LLD when linking code that needs PIC thunks.
Nov 17 2017, 5:54 AM

Nov 16 2017

arichardson created D40129: [ELF] Fall back to search dirs for linker scripts specified with -T.
Nov 16 2017, 7:44 AM
arichardson created D40125: [ELF] Fix rewriting of --sysroot in reproducer tars.
Nov 16 2017, 5:52 AM

Nov 14 2017

arichardson created D40016: Use ImplicitConversionSequence::setAsIdentityConversion(QualType). NFC.
Nov 14 2017, 3:37 AM
arichardson committed rL318144: Rename identifiers named `__output`.
Rename identifiers named `__output`
Nov 14 2017, 3:14 AM
arichardson closed D39537: Rename identifiers named `__output` by committing rL318144: Rename identifiers named `__output`.
Nov 14 2017, 3:14 AM

Nov 9 2017

arichardson added a comment to D39841: [CodeGenPrepare] Check that erased sunken address are not reused.

I just tried applying this patch locally and compiling the FreeBSD kernel again. The runtime crash that goes away if I revert https://reviews.llvm.org/rL314794 is still present even with this patch.

Nov 9 2017, 7:46 AM

Nov 7 2017

arichardson committed rL317572: Add a -D flag to FileCheck to define variables.
Add a -D flag to FileCheck to define variables
Nov 7 2017, 5:25 AM
arichardson closed D39629: Add a -D flag to FileCheck to define variables by committing rL317572: Add a -D flag to FileCheck to define variables.
Nov 7 2017, 5:25 AM
arichardson added inline comments to D39537: Rename identifiers named `__output`.
Nov 7 2017, 5:20 AM
arichardson added a comment to D39548: [ELF] Set the section size on the section start symbols.
In D39548#917330, @ruiu wrote:

I wonder if you have thought about doing this in your loader. Your loader could identify start/end symbols and fix their values, couldn't it?

We could do it in the load however we would then have to hardcode a list of all special symbol names there. Also this will not work for static linking because we don't have a loader there and need LLD to fill in that information.

Nov 7 2017, 4:59 AM
arichardson added a comment to D39548: [ELF] Set the section size on the section start symbols.

Thanks for the detailed answer. Does the static linker create the cap_relocs section, or is it some standalone tool? If it is the static linker itself, then presumably there could be alternative ways of obtaining the size for the capability that would not involve propagating the change into the symbol table. For example set a flag on the symbol definition so that when you are writing out the cap_relocs and encounter a flagged symbol with size 0, you can calculate it from the OutputSection. Not as elegant for the __cap_relocs section but it might be ok to upstream the flagging mechanism?

Originally we used a standalone tool that extracted the information from the symbol table because we had to use BFD for linking. Now we can use LLD (as long as we apply the multi-GOT patch D31528) for building all of FreeBSD (CheriBSD) so I have integrated the __cap_relocs generation into our fork of LLD. For some build we still use the standalone tool but we are now migrating towards using the integrated one for everything.

Nov 7 2017, 4:52 AM

Nov 6 2017

arichardson added inline comments to D39629: Add a -D flag to FileCheck to define variables.
Nov 6 2017, 12:49 PM
arichardson added a comment to D39548: [ELF] Set the section size on the section start symbols.

Can you share a bit more about how CHERI uses the symbol size? Is it only for known linker generated Sections like in your example above, or to support arbitrary user mysection_start symbols? Is the mysection_start symbol special cased within CHERI or is it just an arbitrary ELF Symbol.

We don't do any special casing based on symbol names, we only look at the information from the symbol table. I think having special cases based on the symbol name is very fragile so I'd rather set a size on all linker defined symbols that are used as dereferenceable pointers.

Nov 6 2017, 10:19 AM

Nov 4 2017

arichardson created D39629: Add a -D flag to FileCheck to define variables.
Nov 4 2017, 7:19 AM
arichardson updated the diff for D39548: [ELF] Set the section size on the section start symbols.
  • rebased
  • minor simplification
  • updated all the tests
Nov 4 2017, 6:32 AM

Nov 2 2017

arichardson created D39548: [ELF] Set the section size on the section start symbols.
Nov 2 2017, 6:36 AM
arichardson created D39537: Rename identifiers named `__output`.
Nov 2 2017, 2:19 AM

Oct 25 2017

arichardson committed rL316616: Fix CodeGen/AMDGPU/fcanonicalize-elimination.ll on FreeBSD 11.0.
Fix CodeGen/AMDGPU/fcanonicalize-elimination.ll on FreeBSD 11.0
Oct 25 2017, 2:44 PM
arichardson closed D39306: Fix CodeGen/AMDGPU/fcanonicalize-elimination.ll on FreeBSD 11.0 by committing rL316616: Fix CodeGen/AMDGPU/fcanonicalize-elimination.ll on FreeBSD 11.0.
Oct 25 2017, 2:44 PM
arichardson added inline comments to D39306: Fix CodeGen/AMDGPU/fcanonicalize-elimination.ll on FreeBSD 11.0.
Oct 25 2017, 2:39 PM
arichardson created D39306: Fix CodeGen/AMDGPU/fcanonicalize-elimination.ll on FreeBSD 11.0.
Oct 25 2017, 2:38 PM
arichardson added a comment to D39288: [mips] Fix PR35071.

Thanks for the quick fix! I can confirm that we can now build all of CheriBSD with clang again.

Oct 25 2017, 11:05 AM

Oct 20 2017

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

Oct 18 2017

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

Oct 17 2017

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!

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

Oct 15 2017

arichardson committed rL315871: Convert clang::LangAS to a strongly typed enum.
Convert clang::LangAS to a strongly typed enum
Oct 15 2017, 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.
Oct 15 2017, 11:48 AM

Oct 13 2017

arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Oct 13 2017, 3:18 PM
arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Oct 13 2017, 9:41 AM
arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Oct 13 2017, 9:26 AM
arichardson added inline comments to D38816: Convert clang::LangAS to a strongly typed enum.
Oct 13 2017, 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
Oct 13 2017, 8:30 AM

Oct 12 2017

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

Removed the additional namespace

Oct 12 2017, 6:18 AM

Oct 11 2017

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

Oct 6 2017

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…
Oct 6 2017, 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….
Oct 6 2017, 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.

Oct 6 2017, 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.
Oct 6 2017, 3:16 AM · lld
arichardson created D38614: [ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and R_MIPS_TLS_GOTTPREL.
Oct 6 2017, 3:14 AM · lld

Oct 5 2017

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
Oct 5 2017, 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
Oct 5 2017, 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…
Oct 5 2017, 4:30 PM