Page MenuHomePhabricator
Feed Advanced Search

Today

mstorsjo updated the diff for D57007: [llvm-objcopy] [COFF] Implement --add-gnu-debuglink.

Addressed the review comments.

Mon, Jan 21, 1:56 PM
mstorsjo added inline comments to D57007: [llvm-objcopy] [COFF] Implement --add-gnu-debuglink.
Mon, Jan 21, 1:47 PM
mstorsjo added inline comments to D57007: [llvm-objcopy] [COFF] Implement --add-gnu-debuglink.
Mon, Jan 21, 8:27 AM
mstorsjo added a comment to D57014: [llvm-objcopy] Consistently use createStringError instead of make_error<StringError>. NFC..

Make sure to mention in the commit comment that this also quotes certain symbol names.

Mon, Jan 21, 5:29 AM
mstorsjo created D57014: [llvm-objcopy] Consistently use createStringError instead of make_error<StringError>. NFC..
Mon, Jan 21, 4:44 AM
mstorsjo updated the diff for D57006: [llvm-objcopy] [COFF] Update symbol indices in weak externals.

Going with %s together with StringRef::str() + .c_str() for formatting. Will use this form for later change to unify on createStringError() then.

Mon, Jan 21, 4:29 AM
mstorsjo added inline comments to D57006: [llvm-objcopy] [COFF] Update symbol indices in weak externals.
Mon, Jan 21, 4:03 AM
mstorsjo updated the diff for D57006: [llvm-objcopy] [COFF] Update symbol indices in weak externals.

Applied the suggested changes.

Mon, Jan 21, 3:47 AM
mstorsjo added a comment to D56873: [llvm-objcopy] [COFF] Implement --only-section.

By the way, @jakehehrlich may remember exactly what the intended behaviour is in llvm-objcopy for ELF and combining rules. We discussed it a while back, but I can't remember them exactly, but it was something like explicit section keeps trump implicit section strips, and two explicits are an error. You might want to double-check with him.

Mon, Jan 21, 3:39 AM
mstorsjo added inline comments to D57006: [llvm-objcopy] [COFF] Update symbol indices in weak externals.
Mon, Jan 21, 3:32 AM
mstorsjo created D57009: [llvm-objcopy] [COFF] Fix handling of aux symbols for big objects.
Mon, Jan 21, 2:18 AM
mstorsjo created D57007: [llvm-objcopy] [COFF] Implement --add-gnu-debuglink.
Mon, Jan 21, 2:05 AM
mstorsjo created D57006: [llvm-objcopy] [COFF] Update symbol indices in weak externals.
Mon, Jan 21, 2:04 AM
mstorsjo created D57005: [LLD] [docs] Amend the release notes with more things I've contributed since the last release.
Mon, Jan 21, 1:42 AM
mstorsjo added inline comments to D57004: [docs] Add release notes for notable things I've contributed since last release.
Mon, Jan 21, 1:41 AM
mstorsjo created D57004: [docs] Add release notes for notable things I've contributed since last release.
Mon, Jan 21, 1:38 AM
mstorsjo created D57003: [docs] Add release notes for notable things I've contributed since last release.
Mon, Jan 21, 1:37 AM
mstorsjo created D57001: [libunwind] Don't define unw_fpreg_t to uint64_t for __ARM_DWARF_EH__.
Mon, Jan 21, 12:49 AM

Yesterday

mstorsjo added a comment to D56979: [libcxxabi] Enable LLVM_ENABLE_WARNINGS when building standalone out of tree.

Does libc++ need a similar change?

Sun, Jan 20, 11:17 PM
mstorsjo created D56985: [libunwind] Remove an unused variable.
Sun, Jan 20, 1:39 PM
mstorsjo created D56984: [libunwind] Silence warnings about unused parameters.
Sun, Jan 20, 1:37 PM
mstorsjo created D56983: [libunwind] Add casts to avoid warnings about implicit conversions losing precision.
Sun, Jan 20, 1:35 PM
mstorsjo created D56982: [libunwind] Fix warnings about printf format strings.
Sun, Jan 20, 1:26 PM
mstorsjo created D56981: [libunwind] Enable LLVM_ENABLE_WARNINGS when building standalone out of tree.
Sun, Jan 20, 1:21 PM
mstorsjo created D56980: [libcxxabi] Avoid warnings about an unused parameter when building for windows.
Sun, Jan 20, 1:21 PM
mstorsjo created D56979: [libcxxabi] Enable LLVM_ENABLE_WARNINGS when building standalone out of tree.
Sun, Jan 20, 1:17 PM

Sat, Jan 19

mstorsjo committed rL351663: [llvm-objcopy] [COFF] Implement --only-section.
[llvm-objcopy] [COFF] Implement --only-section
Sat, Jan 19, 11:43 AM
mstorsjo closed D56873: [llvm-objcopy] [COFF] Implement --only-section.
Sat, Jan 19, 11:43 AM
mstorsjo committed rL351662: [llvm-objcopy] [COFF] Implement --only-keep-debug.
[llvm-objcopy] [COFF] Implement --only-keep-debug
Sat, Jan 19, 11:43 AM
mstorsjo closed D56840: [llvm-objcopy] [COFF] Implement --only-keep-debug.
Sat, Jan 19, 11:43 AM
mstorsjo committed rL351661: [llvm-objcopy] [COFF] Implement --strip-debug.
[llvm-objcopy] [COFF] Implement --strip-debug
Sat, Jan 19, 11:43 AM
mstorsjo closed D56839: [llvm-objcopy] [COFF] Implement --strip-debug.
Sat, Jan 19, 11:43 AM
mstorsjo committed rL351660: [llvm-objcopy] [COFF] Add support for removing sections.
[llvm-objcopy] [COFF] Add support for removing sections
Sat, Jan 19, 11:43 AM
mstorsjo closed D56683: [llvm-objcopy] [COFF] Add support for removing sections.
Sat, Jan 19, 11:42 AM
mstorsjo committed rL351659: [llvm-objcopy] [COFF] Add a testcase for patching the debug directory. NFC..
[llvm-objcopy] [COFF] Add a testcase for patching the debug directory. NFC.
Sat, Jan 19, 11:42 AM
mstorsjo closed D56876: [llvm-objcopy] [COFF] Add a testcase for patching the debug directory. NFC..
Sat, Jan 19, 11:42 AM
mstorsjo committed rL351658: [llvm-objcopy] [COFF] Remove a superfluous namespace qualification. NFC..
[llvm-objcopy] [COFF] Remove a superfluous namespace qualification. NFC.
Sat, Jan 19, 11:42 AM
mstorsjo committed rL351657: [llvm-objcopy] [COFF] Rename a test from .yaml to .test. NFC..
[llvm-objcopy] [COFF] Rename a test from .yaml to .test. NFC.
Sat, Jan 19, 11:42 AM

Fri, Jan 18

mstorsjo added inline comments to D56839: [llvm-objcopy] [COFF] Implement --strip-debug.
Fri, Jan 18, 3:14 PM
mstorsjo added inline comments to D56839: [llvm-objcopy] [COFF] Implement --strip-debug.
Fri, Jan 18, 2:53 PM
mstorsjo added inline comments to D56683: [llvm-objcopy] [COFF] Add support for removing sections.
Fri, Jan 18, 2:48 PM
mstorsjo added inline comments to D56873: [llvm-objcopy] [COFF] Implement --only-section.
Fri, Jan 18, 1:57 PM
mstorsjo set the repository for D56930: [llvm-objcopy] Return Error from Buffer::allocate(), [ELF]Writer::finalize(), and [ELF]Writer::commit() to rL LLVM.
Fri, Jan 18, 1:01 PM
mstorsjo added inline comments to D56840: [llvm-objcopy] [COFF] Implement --only-keep-debug.
Fri, Jan 18, 12:53 PM
mstorsjo committed rUNW351587: [SjLj] Don't use __declspec(thread) in MinGW mode.
[SjLj] Don't use __declspec(thread) in MinGW mode
Fri, Jan 18, 12:37 PM
mstorsjo committed rL351587: [SjLj] Don't use __declspec(thread) in MinGW mode.
[SjLj] Don't use __declspec(thread) in MinGW mode
Fri, Jan 18, 12:35 PM
mstorsjo closed D56905: [libunwind] [SjLj] Don't use __declspec(thread) in MinGW mode.
Fri, Jan 18, 12:35 PM
mstorsjo updated the diff for D56873: [llvm-objcopy] [COFF] Implement --only-section.

Updated to test how --only-section combined with --strip-debug behaves - matching GNU objcopy's behaviour.

Fri, Jan 18, 12:28 PM
mstorsjo added a comment to D56873: [llvm-objcopy] [COFF] Implement --only-section.

Just to confirm, the desired behaviour of combining certain switches (e.g. --strip-debug and --only-section) is for the explicitly mentioned --only-section section to be kept despite it potentially being removed by the other switch?

Fri, Jan 18, 12:07 PM
mstorsjo added a comment to D56683: [llvm-objcopy] [COFF] Add support for removing sections.

@rnk or @smeenai - This is awaiting an ack from a COFF perspective.

Fri, Jan 18, 11:37 AM
mstorsjo updated the diff for D56840: [llvm-objcopy] [COFF] Implement --only-keep-debug.

Applied @jhenderson's suggestions.

Fri, Jan 18, 8:28 AM
mstorsjo updated the summary of D56905: [libunwind] [SjLj] Don't use __declspec(thread) in MinGW mode.
Fri, Jan 18, 5:27 AM
mstorsjo created D56905: [libunwind] [SjLj] Don't use __declspec(thread) in MinGW mode.
Fri, Jan 18, 5:26 AM

Thu, Jan 17

mstorsjo added inline comments to D56683: [llvm-objcopy] [COFF] Add support for removing sections.
Thu, Jan 17, 11:22 PM
mstorsjo created D56876: [llvm-objcopy] [COFF] Add a testcase for patching the debug directory. NFC..
Thu, Jan 17, 1:45 PM
mstorsjo added a reviewer for D56683: [llvm-objcopy] [COFF] Add support for removing sections: smeenai.

Adding another COFF-knowledgeable reviewer

Thu, Jan 17, 12:43 PM
mstorsjo created D56873: [llvm-objcopy] [COFF] Implement --only-section.
Thu, Jan 17, 12:09 PM
mstorsjo updated the diff for D56840: [llvm-objcopy] [COFF] Implement --only-keep-debug.

Applied @jhenderson's suggestions. But I also split the input data into a separate yaml file in Inputs, as I'm going to use the same input for another test.

Thu, Jan 17, 12:08 PM
mstorsjo updated the diff for D56839: [llvm-objcopy] [COFF] Implement --strip-debug.

Fixed @jhenderson's suggestions.

Thu, Jan 17, 11:34 AM
mstorsjo added inline comments to D56839: [llvm-objcopy] [COFF] Implement --strip-debug.
Thu, Jan 17, 11:33 AM
mstorsjo created D56840: [llvm-objcopy] [COFF] Implement --only-keep-debug.
Thu, Jan 17, 3:27 AM
mstorsjo created D56839: [llvm-objcopy] [COFF] Implement --strip-debug.
Thu, Jan 17, 3:25 AM

Wed, Jan 16

mstorsjo added a comment to D56683: [llvm-objcopy] [COFF] Add support for removing sections.

It'd be nice if someone else could take a pass too, especially for any COFF-specific aspects, but LGTM

Wed, Jan 16, 2:32 PM
mstorsjo updated the diff for D56683: [llvm-objcopy] [COFF] Add support for removing sections.

Tweaked the scope of lambdas in removeSections to avoid use-after-free of stack variables in the implementation of the lambda captures, as pointed out by asan.

Wed, Jan 16, 1:43 PM
mstorsjo added inline comments to D56683: [llvm-objcopy] [COFF] Add support for removing sections.
Wed, Jan 16, 3:07 AM
mstorsjo updated the diff for D56683: [llvm-objcopy] [COFF] Add support for removing sections.

Applied @rupprecht's suggestions.

Wed, Jan 16, 3:07 AM
mstorsjo committed rL351305: [llvm-rc] Support '--' for delimiting options from input paths.
[llvm-rc] Support '--' for delimiting options from input paths
Wed, Jan 16, 12:14 AM
mstorsjo closed D56743: [llvm-rc] Support '--' for delimiting options from input paths.
Wed, Jan 16, 12:14 AM

Tue, Jan 15

mstorsjo updated the diff for D56743: [llvm-rc] Support '--' for delimiting options from input paths.

Using a lambda that takes StringRef, renamed the lambda parameter to match coding conventions. Will commit tomorrow.

Tue, Jan 15, 2:13 PM
mstorsjo added inline comments to D56743: [llvm-rc] Support '--' for delimiting options from input paths.
Tue, Jan 15, 2:12 PM
mstorsjo added inline comments to D56743: [llvm-rc] Support '--' for delimiting options from input paths.
Tue, Jan 15, 1:56 PM
mstorsjo created D56743: [llvm-rc] Support '--' for delimiting options from input paths.
Tue, Jan 15, 1:46 PM
mstorsjo committed rL351174: [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols.
[llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols
Tue, Jan 15, 1:39 AM
mstorsjo closed D56481: [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols.
Tue, Jan 15, 1:38 AM
mstorsjo committed rL351173: [llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC..
[llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC.
Tue, Jan 15, 1:38 AM

Mon, Jan 14

mstorsjo created D56683: [llvm-objcopy] [COFF] Add support for removing sections.
Mon, Jan 14, 2:47 PM
mstorsjo committed rL351099: [llvm-objcopy] [COFF] Remove unreferenced undefined externals with --strip….
[llvm-objcopy] [COFF] Remove unreferenced undefined externals with --strip…
Mon, Jan 14, 11:00 AM
mstorsjo closed D56660: [llvm-objcopy] [COFF] Remove unreferenced undefined externals with --strip-unneeded..
Mon, Jan 14, 11:00 AM
mstorsjo committed rL351098: [llvm-objcopy] [COFF] Test absolute symbols wrt --strip-unneeded and --discard….
[llvm-objcopy] [COFF] Test absolute symbols wrt --strip-unneeded and --discard…
Mon, Jan 14, 11:00 AM
mstorsjo closed D56659: [llvm-objcopy] [COFF] Test absolute symbols wrt --strip-unneeded and --discard-all. NFC..
Mon, Jan 14, 11:00 AM
mstorsjo added a comment to D56659: [llvm-objcopy] [COFF] Test absolute symbols wrt --strip-unneeded and --discard-all. NFC..

LGTM. I'm assuming that the -1 SectionNumber is what makes them absolute?

Mon, Jan 14, 5:43 AM
mstorsjo created D56660: [llvm-objcopy] [COFF] Remove unreferenced undefined externals with --strip-unneeded..
Mon, Jan 14, 5:03 AM
mstorsjo created D56659: [llvm-objcopy] [COFF] Test absolute symbols wrt --strip-unneeded and --discard-all. NFC..
Mon, Jan 14, 5:00 AM

Sat, Jan 12

mstorsjo updated the diff for D56481: [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols.

I came to the conclusion that setting the Characteristics flags is mostly orthogonal to the stripping of the symbols/relocs (the flag discussed before is actually only relevant for whether executables/DLLs are loadable at a different address than the default), so I split out that part of the patch and I might revisit it later, but it's not essential for the functionality of this patch.

Sat, Jan 12, 3:07 PM
mstorsjo accepted D56508: [llvm-ar] Flatten thin archives..

LGTM

Sat, Jan 12, 4:00 AM
mstorsjo committed rL350996: [llvm-objcopy] [COFF] Remove pointless Reader/Writer base classes. NFC..
[llvm-objcopy] [COFF] Remove pointless Reader/Writer base classes. NFC.
Sat, Jan 12, 12:35 AM
mstorsjo closed D56431: [llvm-objcopy] [COFF] Remove pointless Reader/Writer base classes. NFC..
Sat, Jan 12, 12:35 AM

Fri, Jan 11

mstorsjo added a comment to D56481: [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols.

Alternatively, I could just skip setting the characteristics flags altogether in this patch, as I don't think anything actually reads them on object files, and the context here (removing relocations) only is relevant for object files - base relocs on executables/DLLs are untouched. We can always add them later if deemed necessary. WDYT?

Fri, Jan 11, 3:22 PM
mstorsjo updated the diff for D56481: [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols.

Using a ternary operator as suggested.

Fri, Jan 11, 3:07 PM
mstorsjo added a comment to D56481: [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols.

When doing this, GNU objcopy sets a few Characteristics flags as well - I'm only setting one of them as the other ones are documented to be deprecated. I'd like to have @rnk's opinion on this part.

My suggestion would be to continue setting the deprecated characteristics flags for --strip-all-gnu, but not for --strip-all, if I understand the meaning of the difference between the two flags. --strip-all-gnu should be for more extreme compatibility between gnu, --strip-all is allowed to be a bit more aggressive.
But I have never heard of characteristics before, maybe this is a case where we want to break GNU objcopy compatibility (we don't aim to be bit-for-bit compatible; even GNU-matching flags will different in minor aspects).
Probably best to let @rnk comment on characteristics.

Fri, Jan 11, 3:04 PM
mstorsjo committed rL350927: [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for….
[llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for…
Fri, Jan 11, 6:17 AM
mstorsjo closed D56480: [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for symbols.
Fri, Jan 11, 6:17 AM
mstorsjo committed rL350926: [llvm-objcopy] [COFF] Fix writing object files without symbols/string table.
[llvm-objcopy] [COFF] Fix writing object files without symbols/string table
Fri, Jan 11, 5:51 AM
mstorsjo closed D56584: [llvm-objcopy] [COFF] Fix writing object files without symbols/string table.
Fri, Jan 11, 5:51 AM
mstorsjo updated the diff for D56480: [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for symbols.

Added an undefined external to the tests, changed the code comment to use CLI parameter names.

Fri, Jan 11, 5:41 AM
mstorsjo updated the diff for D56480: [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for symbols.

Split testes into two separate files, with one shared yaml source in the Inputs directory.

Fri, Jan 11, 3:41 AM
mstorsjo added a comment to D56584: [llvm-objcopy] [COFF] Fix writing object files without symbols/string table.

I'm not quite sure I follow why this only affects executable files? Why is this an issue in PE but not plain COFF?

Initially I tried to make the output of llvm-objcopy as close as possible to the output from various tools (llvm-mc and MSVC), and to achieve this, I only skipped including the symbol/string table in executables, while keeping it present in object files.

I know that exactly matching the output of another tool shouldn't be a goal in itself, but I don't know if there are tools out there that would flat out reject an object file with an omitted symbol/string table, as opposed to an empty symbol/string table. So keeping this distinction probably is safer.

So the behaviour change is that for objects, the object now has a pointer to the symbol table, which it didn't before. I think I get it now. The problem is the writeSymbolStringTables function, and you want that to always write a size for object files, even if the table is empty, right?

Fri, Jan 11, 3:29 AM
mstorsjo added a reviewer for D56431: [llvm-objcopy] [COFF] Remove pointless Reader/Writer base classes. NFC.: rupprecht.
Fri, Jan 11, 2:59 AM
mstorsjo updated the summary of D56481: [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols.
Fri, Jan 11, 2:53 AM
mstorsjo updated the diff for D56480: [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for symbols.

Did the suggested changes to the test, added the distinction that --discard-all keeps undefined local symbols.

Fri, Jan 11, 2:53 AM