Page MenuHomePhabricator

pcc (Peter Collingbourne)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 28 2012, 2:34 PM (324 w, 5 d)

Recent Activity

Yesterday

pcc added inline comments to D59531: [ELF] Produce multiple PT_NOTE segments as needed.
Wed, Mar 20, 4:46 PM · Restricted Project

Tue, Mar 19

pcc added a comment to D59531: [ELF] Produce multiple PT_NOTE segments as needed.
In D59531#1434312, @pcc wrote:

Is it possible for this to fail with a linker script that looks like:

SECTIONS {
  . = SIZEOF_HEADERS;
  .note1 : { *(.note1) }
  . = 0x10000;
  .note2 : { *(.note2) }
}

?

Is this realistic? I'm not worried too much about this because it seems you are intentionally creating a large gap between .note sections.

Tue, Mar 19, 1:23 PM · Restricted Project
pcc added a comment to D58426: llvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file offsets..

It seems quite easy to handle TLS. See the change that I just uploaded. Similar code would be necessary to correctly extract partitions if for example the first partition had a .tbss whose address space extended into the second partition.

Tue, Mar 19, 1:19 PM · Restricted Project
pcc updated the diff for D58426: llvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file offsets..

Handle TLS

Tue, Mar 19, 12:56 PM · Restricted Project
pcc added a comment to D58426: llvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file offsets..

I mean in the handler for the option you can re-traverse the program headers for each section and handle your check.

Tue, Mar 19, 12:07 PM · Restricted Project
pcc committed rGe092f806f09e: gn build: Merge r356387. (authored by pcc).
gn build: Merge r356387.
Tue, Mar 19, 10:33 AM
pcc committed rG0dd018d944de: gn build: Merge r356451. (authored by pcc).
gn build: Merge r356451.
Tue, Mar 19, 10:33 AM
pcc committed rL356485: gn build: Merge r356387..
gn build: Merge r356387.
Tue, Mar 19, 10:33 AM
pcc committed rL356484: gn build: Merge r356451..
gn build: Merge r356451.
Tue, Mar 19, 10:33 AM
pcc added a comment to D58426: llvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file offsets..

For your use case you can simply traverse the program headers for each to see if a section is indeed loadable. e.g. you want to strip all non-loadable allocated sections. That seems like a good thing but this probably isn't the right way to handle it IMO.

Tue, Mar 19, 10:05 AM · Restricted Project
pcc added inline comments to D59351: [llvm-objcopy] Add --update-section.
Tue, Mar 19, 9:46 AM

Mon, Mar 18

pcc added a comment to D59531: [ELF] Produce multiple PT_NOTE segments as needed.

Is it possible for this to fail with a linker script that looks like:

SECTIONS {
  . = SIZEOF_HEADERS;
  .note1 : { *(.note1) }
  . = 0x10000;
  .note2 : { *(.note2) }
}

?

Mon, Mar 18, 7:57 PM · Restricted Project

Sat, Mar 16

pcc committed rG68b4673feaaf: CodeGen: Preserve packed attribute in constStructWithPadding. (authored by pcc).
CodeGen: Preserve packed attribute in constStructWithPadding.
Sat, Mar 16, 12:28 PM
pcc committed rC356328: CodeGen: Preserve packed attribute in constStructWithPadding..
CodeGen: Preserve packed attribute in constStructWithPadding.
Sat, Mar 16, 12:28 PM
pcc committed rL356328: CodeGen: Preserve packed attribute in constStructWithPadding..
CodeGen: Preserve packed attribute in constStructWithPadding.
Sat, Mar 16, 12:28 PM
pcc closed D59446: CodeGen: Preserve packed attribute in constStructWithPadding..
Sat, Mar 16, 12:28 PM · Restricted Project, Restricted Project

Fri, Mar 15

pcc committed rGc51470e7ef13: gn build: Merge r356305. (authored by pcc).
gn build: Merge r356305.
Fri, Mar 15, 8:46 PM
pcc created D59446: CodeGen: Preserve packed attribute in constStructWithPadding..
Fri, Mar 15, 8:45 PM · Restricted Project, Restricted Project
pcc committed rL356314: gn build: Merge r356305..
gn build: Merge r356305.
Fri, Mar 15, 8:45 PM
pcc committed rG3dea5480170d: gn build: Add missing dependency to check-clang target. (authored by pcc).
gn build: Add missing dependency to check-clang target.
Fri, Mar 15, 3:50 PM
pcc committed rL356306: gn build: Add missing dependency to check-clang target..
gn build: Add missing dependency to check-clang target.
Fri, Mar 15, 3:46 PM

Thu, Mar 14

pcc accepted D59404: [ELF] Add a test for large .bss.rel.ro.

LGTM

Thu, Mar 14, 8:29 PM · Restricted Project
pcc added inline comments to D59404: [ELF] Add a test for large .bss.rel.ro.
Thu, Mar 14, 8:10 PM · Restricted Project
pcc added a comment to D56828: [ELF] Simplify RelRo, TLS, NOBITS section ranks and make RW PT_LOAD start with RelRo.

Looks good, please go ahead and modify the tests.

I'll take that as approval as in offline discussion ruiu said he didn't have objection and was waiting on your decision :)

Thu, Mar 14, 7:13 PM · Restricted Project
pcc added a comment to D58892: [ELF] Split RW PT_LOAD on the PT_GNU_RELRO boundary.

Is there a test that shows that the behavior is correct if a .bss.rel.ro is large enough to require another page?

Thu, Mar 14, 6:33 PM · Restricted Project

Wed, Mar 13

pcc accepted D59320: [HWASan] Use less Printf() calls in register dump..

LGTM

Wed, Mar 13, 5:38 PM · Restricted Project, Restricted Project
pcc added a comment to D58892: [ELF] Split RW PT_LOAD on the PT_GNU_RELRO boundary.

Looks good modulo tests.

Wed, Mar 13, 5:13 PM · Restricted Project
pcc added a comment to D56828: [ELF] Simplify RelRo, TLS, NOBITS section ranks and make RW PT_LOAD start with RelRo.

Looks good, please go ahead and modify the tests.

Wed, Mar 13, 5:10 PM · Restricted Project
pcc added a comment to D59320: [HWASan] Use less Printf() calls in register dump..

Yes, I meant for all of them.

Wed, Mar 13, 5:10 PM · Restricted Project, Restricted Project
pcc added inline comments to D59320: [HWASan] Use less Printf() calls in register dump..
Wed, Mar 13, 4:54 PM · Restricted Project, Restricted Project
pcc created D59333: ELF: Rename Configuration::Static to Bstatic. NFCI..
Wed, Mar 13, 2:53 PM · Restricted Project
pcc added inline comments to D59275: [ELF] Emit weak-undef symbols in .dynsym of a PIE only if linked against shared libs..
Wed, Mar 13, 2:32 PM · Restricted Project
pcc added a reviewer for D59311: [ELF] Dump symbols ordered by profiled guided section layout to file.: Bigcheese.
Wed, Mar 13, 11:29 AM · Restricted Project

Tue, Mar 12

pcc added a comment to D59275: [ELF] Emit weak-undef symbols in .dynsym of a PIE only if linked against shared libs..

It looks like our handling of weak undef in executables is a little unusual. At least it does not match the other two linkers. Taking ELF/weak-undef.s as an example:

$ ld.lld ra/obj/lld/test/ELF/Output/weak-undef.s.tmp.o -o ra/obj/lld/test/ELF/Output/weak-undef.s.tmp -pie 
$ nm -D ra/obj/lld/test/ELF/Output/weak-undef.s.tmp
                 w foo
$ ld.gold ra/obj/lld/test/ELF/Output/weak-undef.s.tmp.o -o ra/obj/lld/test/ELF/Output/weak-undef.s.tmp -pie 
$ nm -D ra/obj/lld/test/ELF/Output/weak-undef.s.tmp
nm: ra/obj/lld/test/ELF/Output/weak-undef.s.tmp: no symbols
$ ld.bfd ra/obj/lld/test/ELF/Output/weak-undef.s.tmp.o -o ra/obj/lld/test/ELF/Output/weak-undef.s.tmp -pie 
$ nm -D ra/obj/lld/test/ELF/Output/weak-undef.s.tmp
nm: ra/obj/lld/test/ELF/Output/weak-undef.s.tmp: no symbols
Tue, Mar 12, 3:58 PM · Restricted Project
pcc committed rG8a28673a2ebc: ELF: Don't add .dynamic strings to .dynstr early. (authored by pcc).
ELF: Don't add .dynamic strings to .dynstr early.
Tue, Mar 12, 1:58 PM
pcc committed rLLD355977: ELF: Don't add .dynamic strings to .dynstr early..
ELF: Don't add .dynamic strings to .dynstr early.
Tue, Mar 12, 1:57 PM
pcc committed rL355977: ELF: Don't add .dynamic strings to .dynstr early..
ELF: Don't add .dynamic strings to .dynstr early.
Tue, Mar 12, 1:57 PM
pcc closed D59240: ELF: Don't add .dynamic strings to .dynstr early..
Tue, Mar 12, 1:57 PM · Restricted Project
pcc added a comment to D59254: [RFC] Implementation of Clang randstruct.

This needs a test under test/CodeGen at least.

Tue, Mar 12, 1:57 PM · Restricted Project
pcc added inline comments to D59216: [LLD][ELF][ARM] Redesign of .ARM.exidx handling to use a SyntheticSection.
Tue, Mar 12, 1:46 PM · Restricted Project
pcc committed rGe2b8c40a7726: ELF: Use bump pointer allocator for uncompressed section buffers. NFCI. (authored by pcc).
ELF: Use bump pointer allocator for uncompressed section buffers. NFCI.
Tue, Mar 12, 1:32 PM
pcc committed rL355966: ELF: Use bump pointer allocator for uncompressed section buffers. NFCI..
ELF: Use bump pointer allocator for uncompressed section buffers. NFCI.
Tue, Mar 12, 1:31 PM
pcc committed rLLD355966: ELF: Use bump pointer allocator for uncompressed section buffers. NFCI..
ELF: Use bump pointer allocator for uncompressed section buffers. NFCI.
Tue, Mar 12, 1:31 PM
pcc closed D59269: ELF: Use bump pointer allocator for uncompressed section buffers. NFCI..
Tue, Mar 12, 1:31 PM · Restricted Project
pcc added a comment to D59269: ELF: Use bump pointer allocator for uncompressed section buffers. NFCI..

I thought that we could protect BumpPtrAllocator::Allocate with a mutex, but since StringSaver directly calls that function, there's no way to acquire a lock before calling that function. Maybe we should protect StringSaver::save?

Tue, Mar 12, 1:06 PM · Restricted Project
pcc added a comment to D59269: ELF: Use bump pointer allocator for uncompressed section buffers. NFCI..

I wonder how much does it actually cost to acquire a lock under the situation where there's no contention. Except this place, all accesses to BAlloc are already serialized, so there's usually no contention. If the cost of acquiring a lock under that situation is negligible, I'd imagine that always acquiring the lock could be a reasonable option.

Tue, Mar 12, 12:24 PM · Restricted Project
pcc committed rG2da7b32684ef: ELF: Simplify. NFCI. (authored by pcc).
ELF: Simplify. NFCI.
Tue, Mar 12, 12:19 PM
pcc committed rLLD355954: ELF: Simplify. NFCI..
ELF: Simplify. NFCI.
Tue, Mar 12, 12:18 PM
pcc committed rL355954: ELF: Simplify. NFCI..
ELF: Simplify. NFCI.
Tue, Mar 12, 12:18 PM
pcc closed D59239: ELF: Simplify. NFCI..
Tue, Mar 12, 12:18 PM · Restricted Project
pcc created D59269: ELF: Use bump pointer allocator for uncompressed section buffers. NFCI..
Tue, Mar 12, 11:16 AM · Restricted Project

Mon, Mar 11

pcc created D59240: ELF: Don't add .dynamic strings to .dynstr early..
Mon, Mar 11, 8:20 PM · Restricted Project
pcc created D59239: ELF: Simplify. NFCI..
Mon, Mar 11, 7:19 PM · Restricted Project
pcc committed rGb5a307fa244f: ELF: Remove dead code. NFCI. (authored by pcc).
ELF: Remove dead code. NFCI.
Mon, Mar 11, 7:17 PM
pcc committed rL355893: ELF: Remove dead code. NFCI..
ELF: Remove dead code. NFCI.
Mon, Mar 11, 7:17 PM
pcc committed rLLD355893: ELF: Remove dead code. NFCI..
ELF: Remove dead code. NFCI.
Mon, Mar 11, 7:17 PM
pcc closed D59052: ELF: Remove dead code. NFCI..
Mon, Mar 11, 7:17 PM · Restricted Project
pcc committed rGbf92b3f48014: llvm-objcopy: Remove unused field. NFCI. (authored by pcc).
llvm-objcopy: Remove unused field. NFCI.
Mon, Mar 11, 7:17 PM
pcc committed rL355892: llvm-objcopy: Remove unused field. NFCI..
llvm-objcopy: Remove unused field. NFCI.
Mon, Mar 11, 7:17 PM
pcc closed D59126: llvm-objcopy: Remove unused field. NFCI..
Mon, Mar 11, 7:17 PM · Restricted Project
pcc added a comment to D59216: [LLD][ELF][ARM] Redesign of .ARM.exidx handling to use a SyntheticSection.

Thanks Peter. I think I prefer this approach.

Mon, Mar 11, 11:19 AM · Restricted Project

Fri, Mar 8

pcc added a comment to D59160: lit: Remove the binary_feature function and inline it everywhere..

Hmm, I remembered that we can just do e.g. REQUIRES: !asan. So maybe we should make that change globally and only define the positive features here.

Fri, Mar 8, 3:04 PM · Restricted Project
pcc updated the diff for D59160: lit: Remove the binary_feature function and inline it everywhere..
  • Fix typo
Fri, Mar 8, 2:48 PM · Restricted Project
pcc created D59160: lit: Remove the binary_feature function and inline it everywhere..
Fri, Mar 8, 2:48 PM · Restricted Project
pcc accepted D58857: [HWASan] Save + print registers when tag mismatch occurs in AArch64..

LGTM

Fri, Mar 8, 12:49 PM · Restricted Project, Restricted Project
pcc added a comment to D59126: llvm-objcopy: Remove unused field. NFCI..

An alternative to storing this field in Segment would be to store a reference to the file contents as a field in Object. That would allow you to access the segment contents using the OriginalOffset and Size fields, and also seems like it might allow you to remove the various Contents fields from the Section hierarchy. So maybe we should remove this field in case that approach turns out to work out better?

Fri, Mar 8, 12:26 PM · Restricted Project
pcc accepted D59075: [WebAssembly] Don't mark lazy symbols as `IsUsedInRegularObj`.

LGTM

Fri, Mar 8, 11:30 AM · Restricted Project
pcc added inline comments to D58857: [HWASan] Save + print registers when tag mismatch occurs in AArch64..
Fri, Mar 8, 11:08 AM · Restricted Project, Restricted Project
pcc added a comment to D59133: Remove esan..

How about DFSan and shadowcallstack?

I don't understand how that question is related to this change. What do you mean?

shadowcallstack still misses even runtime.

Fri, Mar 8, 10:59 AM · Restricted Project, Restricted Project
pcc added a comment to D59133: Remove esan..

LGTM, good job!

Regarding dfsan, I think it has users @pcc

Fri, Mar 8, 10:58 AM · Restricted Project, Restricted Project

Thu, Mar 7

pcc created D59126: llvm-objcopy: Remove unused field. NFCI..
Thu, Mar 7, 9:54 PM · Restricted Project
pcc added a comment to D59120: [ELF] Sort notes by alignment in decreasing order.

An alternative solution might be to create a PT_NOTE for each note upfront, and opportunistically merge them if they end up being laid out contiguously. This would also handle the case where a note's size is not a multiple of its alignment.

Thu, Mar 7, 6:05 PM · Restricted Project
pcc added inline comments to D58857: [HWASan] Save + print registers when tag mismatch occurs in AArch64..
Thu, Mar 7, 4:12 PM · Restricted Project, Restricted Project
pcc accepted D59115: gn build: Unbreak get.py and gn.py on Windows.

LGTM

Thu, Mar 7, 3:52 PM · Restricted Project
pcc committed rGdfbb9a793e58: ELF: Reduce the size of InputSectionBase by two words. NFCI. (authored by pcc).
ELF: Reduce the size of InputSectionBase by two words. NFCI.
Thu, Mar 7, 10:48 AM
pcc committed rLLD355622: ELF: Reduce the size of InputSectionBase by two words. NFCI..
ELF: Reduce the size of InputSectionBase by two words. NFCI.
Thu, Mar 7, 10:47 AM
pcc committed rL355622: ELF: Reduce the size of InputSectionBase by two words. NFCI..
ELF: Reduce the size of InputSectionBase by two words. NFCI.
Thu, Mar 7, 10:47 AM
pcc closed D59044: ELF: Reduce the size of InputSectionBase by two words. NFCI..
Thu, Mar 7, 10:47 AM · Restricted Project

Wed, Mar 6

pcc added a comment to D59074: [WebAssembly] Fix build after rL355577.

Turns own that IsUsedInRegularObject is set for lazy (archive) symbols.

Wed, Mar 6, 8:35 PM · Restricted Project
pcc accepted D59012: [WebAssembly] LTO: Don't include bitcode-only symbols in the symtab.

LGTM

Wed, Mar 6, 6:04 PM · Restricted Project
pcc created D59052: ELF: Remove dead code. NFCI..
Wed, Mar 6, 2:24 PM · Restricted Project
pcc committed rG480bce28ffc4: gn build: Merge r355514. (authored by pcc).
gn build: Merge r355514.
Wed, Mar 6, 1:24 PM
pcc created D59044: ELF: Reduce the size of InputSectionBase by two words. NFCI..
Wed, Mar 6, 1:24 PM · Restricted Project
pcc committed rL355552: gn build: Merge r355514..
gn build: Merge r355514.
Wed, Mar 6, 1:21 PM
pcc accepted D59034: Delete x86_64 ShadowCallStack support.

Thanks for cleaning this up.

Wed, Mar 6, 11:28 AM · Restricted Project, Restricted Project, Restricted Project
pcc added inline comments to D59012: [WebAssembly] LTO: Don't include bitcode-only symbols in the symtab.
Wed, Mar 6, 10:27 AM · Restricted Project

Tue, Mar 5

pcc committed rGc2d6b84d3c7e: gn build: Merge r355439. (authored by pcc).
gn build: Merge r355439.
Tue, Mar 5, 7:10 PM
pcc committed rG5ee9abd4c80b: ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI. (authored by pcc).
ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI.
Tue, Mar 5, 7:10 PM
pcc committed rG704dfd6e28cb: ELF: Extract a non-ELFT base class for VersionNeedSection. (authored by pcc).
ELF: Extract a non-ELFT base class for VersionNeedSection.
Tue, Mar 5, 7:10 PM
pcc committed rL355480: gn build: Merge r355439..
gn build: Merge r355439.
Tue, Mar 5, 7:09 PM
pcc committed rL355479: ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI..
ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI.
Tue, Mar 5, 7:09 PM
pcc committed rLLD355479: ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI..
ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI.
Tue, Mar 5, 7:09 PM
pcc closed D58810: ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI..
Tue, Mar 5, 7:09 PM · Restricted Project
pcc committed rLLD355478: ELF: Extract a non-ELFT base class for VersionNeedSection..
ELF: Extract a non-ELFT base class for VersionNeedSection.
Tue, Mar 5, 7:09 PM
pcc committed rL355478: ELF: Extract a non-ELFT base class for VersionNeedSection..
ELF: Extract a non-ELFT base class for VersionNeedSection.
Tue, Mar 5, 7:09 PM
pcc closed D58808: ELF: Extract a non-ELFT base class for VersionNeedSection..
Tue, Mar 5, 7:09 PM · Restricted Project
pcc added inline comments to D59003: [GN] Locate prebuilt binaries correctly..
Tue, Mar 5, 5:50 PM · Restricted Project
pcc committed rGdbdfd43b573f: gn build: Add 32-bit Linux support. (authored by pcc).
gn build: Add 32-bit Linux support.
Tue, Mar 5, 5:28 PM
pcc committed rL355467: gn build: Add 32-bit Linux support..
gn build: Add 32-bit Linux support.
Tue, Mar 5, 5:28 PM
pcc closed D58839: gn build: Add 32-bit Linux support..
Tue, Mar 5, 5:28 PM · Restricted Project