Page MenuHomePhabricator

mtrent (Michael Trent)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 5 2017, 3:14 PM (97 w, 2 d)

Recent Activity

Tue, Oct 15

mtrent committed rL374958: add mdtrent.
add mdtrent
Tue, Oct 15, 5:17 PM

Fri, Sep 27

mtrent accepted D68116: [llvm-lipo] Add support for -arch.
Fri, Sep 27, 10:21 AM · Restricted Project

Mon, Sep 23

mtrent accepted D67758: [llvm-lipo] Add support for archives.

Logic looks fine. I have some concerns around alignment terminology that I suggest you address before committing.

Mon, Sep 23, 12:49 PM · Restricted Project

Fri, Sep 20

mtrent committed rG6a234677f491: Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong) (authored by mtrent).
Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong)
Fri, Sep 20, 12:15 PM
mtrent committed rL372421: Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong).
Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong)
Fri, Sep 20, 12:15 PM
mtrent closed D67780: Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong).
Fri, Sep 20, 12:14 PM · Restricted Project
mtrent updated the diff for D67780: Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong).

mechanical comment changes

Fri, Sep 20, 10:41 AM · Restricted Project
mtrent updated the diff for D67780: Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong).

Updating to use path::append to build the bundle contents string.

Fri, Sep 20, 10:35 AM · Restricted Project

Thu, Sep 19

mtrent created D67780: Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong).
Thu, Sep 19, 5:42 PM · Restricted Project

Wed, Sep 18

mtrent added inline comments to D67700: [Object] Extend MachOUniversalBinary::getObjectForArch.
Wed, Sep 18, 11:23 AM · Restricted Project

Aug 6 2019

mtrent added inline comments to D65676: [llvm-lipo] Update llvm-lipo docs for -info -thin -create -replace -segalign flags.
Aug 6 2019, 4:15 PM · Restricted Project

Jul 31 2019

mtrent accepted D65491: [llvm-objdump] Fix jumptable detection when disassembling Mach-O binaries.

LGTM, visual inspection only.

Jul 31 2019, 2:01 PM · Restricted Project

Jul 30 2019

mtrent accepted D65477: [build] add the ability to create a symlink for lipo.
Jul 30 2019, 2:02 PM · Restricted Project

Jul 2 2019

mtrent added a comment to D64102: [llvm-lipo] Implement -create part 1.

@mtrent We have implemented create with the -fat64 flag to specify a fat64binary, similar to cctools lipo.
Do we still need this flag, or can we always create a fat64 binary?
Another option would be to have some sort of auto detection to create a fat64 binary when the offset of a section exceeds 32 bits.

Jul 2 2019, 3:48 PM · Restricted Project

Jun 24 2019

mtrent accepted D63735: [MachOObjectFile]Added Valid Architecture Function.
Jun 24 2019, 3:37 PM · Restricted Project
mtrent accepted D63719: [docs][llvm-readobj] Improve llvm-readobj documentation.
Jun 24 2019, 3:23 PM · Restricted Project
mtrent accepted D63651: [docs][llvm-symbolizer] Improve llvm-symbolizer documentation.

I wonder why the Mach-O specific commands are unlike that of other utilities ... In any case, these changes look fine.

Jun 24 2019, 6:17 AM · Restricted Project

Jun 21 2019

mtrent accepted D63341: [llvm-lipo] Implement -thin.
Jun 21 2019, 12:19 AM · Restricted Project
mtrent added a comment to D63341: [llvm-lipo] Implement -thin.

Note: "llvm-lipo" does not work properly with certain Mach-O executables, such as those built with the -hideARM64 flag.

Fixed most of these issues, but for printing a list of knows architectures I am planning to make a change in a separate diff that returns a list of valid architectures, since I will no longer be modifying llvm-lipo code.

For the MachO executables built with -hideARM64 flag, I filed a bug for MachOUniversalBinary: https://bugs.llvm.org/show_bug.cgi?id=42343.

Jun 21 2019, 12:19 AM · Restricted Project
mtrent added a comment to D63606: [docs][llvm-objdump] Improve llvm-objdump documentation.

BTW, there is a manpage: llvm/docs/llvm-objdump.1. It'd be nice to check if it needs updates as well.

Jun 21 2019, 12:16 AM · Restricted Project
mtrent accepted D63606: [docs][llvm-objdump] Improve llvm-objdump documentation.
Jun 21 2019, 12:16 AM · Restricted Project

Jun 20 2019

mtrent accepted D63327: [docs][llvm-nm] Improve symbol code documentation.
Jun 20 2019, 10:26 AM · Restricted Project

Jun 19 2019

mtrent added a comment to D63341: [llvm-lipo] Implement -thin.

i think that we should not "replicate cctools lipo error messages exactly", ours could be better / more convenient or informative where it makes sense.
But in this particular case (see the comments above) I agree, including the names into the error message would be good!
Regarding exit codes - yes, it's important (for many reasons) to make sure that our exit codes are correct.

Jun 19 2019, 8:38 AM · Restricted Project

Jun 18 2019

mtrent requested changes to D63341: [llvm-lipo] Implement -thin.

Would be nice if "llvm-lipo -thin" printed a reasonable error message before dumping usage. Apple lipo will print "missing argument to -thin option"

Jun 18 2019, 9:13 PM · Restricted Project
mtrent committed rGc2885ded2b1e: Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-used (authored by mtrent).
Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-used
Jun 18 2019, 3:18 PM
mtrent committed rL363746: Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-used.
Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-used
Jun 18 2019, 3:16 PM
mtrent closed D62866: Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-used.
Jun 18 2019, 3:16 PM · Restricted Project

Jun 15 2019

mtrent added a comment to D63341: [llvm-lipo] Implement -thin.

I'll have a look Monday / early next week. Meanwhile, here are some quick thoughts.

Jun 15 2019, 12:47 AM · Restricted Project
mtrent accepted D63340: [llvm-nm] Fix for BZ41711 - Class character for a symbol with undefined binding does not match class assigned by GNU nm.

Respectfully, I am not a good reviewer for ELF-specific file format changes. I assume you added me as a proxy for 'enderby', who touched some of the lines of this routine. Looking at the SVN history I believe Kevin Enderby's involvement was limited to promulgating Lang Hames' "Expected<>" as the preferred error handling idiom in libObject and friends. So, again, respectfully, neither Kevin nor I are what I would consider good, authoritative reviewers for ELF.

Jun 15 2019, 12:30 AM
mtrent added a comment to D63327: [docs][llvm-nm] Improve symbol code documentation.

All this looks reasonable, but my grasp of Mach-O is not as complete as I would like, and I have some questions for you.

Jun 15 2019, 12:12 AM · Restricted Project

Jun 11 2019

mtrent accepted D63142: [llvm-nm] Fix docs and help text for --print-size.
Jun 11 2019, 10:35 AM · Restricted Project

Jun 10 2019

mtrent accepted D63100: [llvm-lipo] Update llvm-lipo docs for -archs flag.

approving this revision in light of my notes inline. I still believe this command guide is going to need an editorial pass once all of the options are in. my main concern for the moment is that the information is accurate and complete.

Jun 10 2019, 10:18 PM · Restricted Project

Jun 7 2019

mtrent accepted D62753: [llvm-lipo] Implement -archs.
Jun 7 2019, 11:46 AM · Restricted Project
mtrent accepted D62706: [llvm-lipo] Add docs for llvm-lipo.

Thanks for making this!

Jun 7 2019, 7:55 AM · Restricted Project

Jun 6 2019

mtrent added a comment to D62706: [llvm-lipo] Add docs for llvm-lipo.

I had trouble getting recommonmark.parser to install on my system, so I hacked at the patch to get the html and groff formatters to run. Should not be relevant to this review.

Jun 6 2019, 3:31 PM · Restricted Project
mtrent added a reviewer for D62812: [llvm] [CodeView] Move Triple::ArchType → CPUType mapping from LLDB: friss.

I am not familiar with lldb or with the DebugView library, so I am pulling in Fred Riss for this review. Thanks!

Jun 6 2019, 2:48 PM · Restricted Project
mtrent resigned from D62812: [llvm] [CodeView] Move Triple::ArchType → CPUType mapping from LLDB.
Jun 6 2019, 2:48 PM · Restricted Project
mtrent requested changes to D62753: [llvm-lipo] Implement -archs.

I did not download or run this code, but I believe it does not correctly divine the Arch flag from a given Mach-O binary. This is straight-forward to fix.

Jun 6 2019, 2:42 PM · Restricted Project
mtrent accepted D62955: [llvm-nm] Additional lit tests for command line options.
Jun 6 2019, 8:14 AM

Jun 4 2019

mtrent updated the diff for D62866: Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-used.

Trim unused space from the macho-dylib.test file.

Jun 4 2019, 10:20 AM · Restricted Project
mtrent created D62866: Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-used.
Jun 4 2019, 10:15 AM · Restricted Project

Jun 3 2019

mtrent accepted D62773: [llvm] [test] Remove non-portable EISDIR test from macho-disassemble-g-dsym.test.

Given the problems we've seen with windows and netbsd, I think it makes sense for llvm-obdump to have a better, more bespoke error case, one that is stable on all platforms. so let's pull this test.

Jun 3 2019, 7:20 AM · Restricted Project

Jun 1 2019

mtrent added a comment to D62773: [llvm] [test] Remove non-portable EISDIR test from macho-disassemble-g-dsym.test.

"It does not seem to serve any real purpose..."

Jun 1 2019, 9:11 AM · Restricted Project

May 30 2019

mtrent committed rG5e1881f9b234: Update the tests in r362121 / r362141 to allow for Windows-specific error… (authored by mtrent).
Update the tests in r362121 / r362141 to allow for Windows-specific error…
May 30 2019, 3:09 PM
mtrent committed rL362167: Update the tests in r362121 / r362141 to allow for Windows-specific error.
Update the tests in r362121 / r362141 to allow for Windows-specific error
May 30 2019, 3:08 PM
mtrent committed rGc58130bc8445: Write new tests for r362121 (authored by mtrent).
Write new tests for r362121
May 30 2019, 1:07 PM
mtrent committed rL362141: Write new tests for r362121.
Write new tests for r362121
May 30 2019, 1:06 PM
mtrent closed D62694: Write new tests for r362121.
May 30 2019, 1:06 PM · Restricted Project
mtrent created D62694: Write new tests for r362121.
May 30 2019, 11:56 AM · Restricted Project
mtrent committed rG5d5f62992296: Reverting change r362121 due to lld-x86_64-ubuntu-fast test failures (authored by mtrent).
Reverting change r362121 due to lld-x86_64-ubuntu-fast test failures
May 30 2019, 11:15 AM
mtrent committed rG50daaa5f6b26: Support Universal dSYM files in llvm-objdump (authored by mtrent).
Support Universal dSYM files in llvm-objdump
May 30 2019, 11:14 AM
mtrent committed rL362123: Reverting change r362121 due to lld-x86_64-ubuntu-fast test failures.
Reverting change r362121 due to lld-x86_64-ubuntu-fast test failures
May 30 2019, 11:14 AM
mtrent committed rL362121: Support Universal dSYM files in llvm-objdump.
Support Universal dSYM files in llvm-objdump
May 30 2019, 11:14 AM
mtrent closed D62642: Support Universal dSYM files in llvm-objdump.
May 30 2019, 11:14 AM · Restricted Project
mtrent added inline comments to D62642: Support Universal dSYM files in llvm-objdump.
May 30 2019, 10:52 AM · Restricted Project
mtrent updated the diff for D62642: Support Universal dSYM files in llvm-objdump.

Remove tabs inserted by emacs (grr)

May 30 2019, 10:51 AM · Restricted Project
mtrent updated the diff for D62642: Support Universal dSYM files in llvm-objdump.

Increasing error checking to catch symbolic files that are neither
Mach-O nor Universal object files.

May 30 2019, 8:12 AM · Restricted Project

May 29 2019

mtrent created D62642: Support Universal dSYM files in llvm-objdump.
May 29 2019, 8:45 PM · Restricted Project

May 23 2019

mtrent accepted D61927: [tools]Introduce llvm-lipo.

That's a pretty big hammer. Let's give it a try!

May 23 2019, 5:49 PM · Restricted Project
mtrent accepted D62296: [Object] object::ELFObjectFile::symbol_begin(): skip symbol index 0.
May 23 2019, 8:08 AM · Restricted Project

May 22 2019

mtrent accepted D62148: [llvm-nm] Omit the symbol table entry at index 0 when --debug-syms is enabled for ELF files.

I'm not sure. I think there are limited use cases for being able to use that symbol, and it's possible that other clients actively want to dump the value. However, if there aren't any existing uses within LLVM, and we provide an alternative interface to get that symbol, I could get behind this.

May 22 2019, 7:54 AM

May 21 2019

mtrent added a comment to D62148: [llvm-nm] Omit the symbol table entry at index 0 when --debug-syms is enabled for ELF files.

While this seems to be a direct way to address this, should the ELF object file instead begin the symbol range at 1 instead of 0? That way all clients of libObject know to skip the undefined range and you don't need to modify every call site.

May 21 2019, 9:27 AM

May 17 2019

mtrent committed rG07c96ebd9442: Update llvm-nm -s to use a multi-var option (authored by mtrent).
Update llvm-nm -s to use a multi-var option
May 17 2019, 8:16 PM
mtrent committed rL361091: Update llvm-nm -s to use a multi-var option.
Update llvm-nm -s to use a multi-var option
May 17 2019, 8:14 PM
mtrent closed D62070: Update llvm-nm -s to use a multi-var option.
May 17 2019, 8:14 PM · Restricted Project
mtrent created D62070: Update llvm-nm -s to use a multi-var option.
May 17 2019, 11:07 AM · Restricted Project

May 15 2019

mtrent added a comment to D61927: [tools]Introduce llvm-lipo.

regarding -verify_arch X Y Z - yeah, I can try to make it work with LLVM's command line options parser, not sure if this interface is ideal / better than -verify_arch X -verify_arch Y -verify_arch Z, but yeah, on the other hand, this would be an incompatibility / would require customers of the old tool to update their scripts/code. The downside of the old interface - the positional argument should go before -verify_arch. To be honest at the moment I don't see how to express the old behavior of -verify_arch using libCommandLine, any suggestions would be helpful, alternatively we can try to live with this incompatibility.

May 15 2019, 9:08 PM · Restricted Project
mtrent added inline comments to D61927: [tools]Introduce llvm-lipo.
May 15 2019, 4:04 PM · Restricted Project
mtrent added a comment to D61927: [tools]Introduce llvm-lipo.

A second thought on the topic of lipo compatibility. libObject is probably reasonable if your primary interest is MH_OBJECT files. There exist a number of final-linked-images that libObject's fat parser will not currently understand; these are formats that cannot be produced by llvm tools today. I wonder if choosing a different name for the tool might give you some flexibility to "do things differently" than lipo. That said, I don't have a better name in mind. :)

May 15 2019, 4:04 PM · Restricted Project

May 14 2019

mtrent added a comment to D61927: [tools]Introduce llvm-lipo.

I hate to be "That Guy" but this really needs a docs/CommandGuide file.

May 14 2019, 7:11 PM · Restricted Project

Apr 18 2019

mtrent added a comment to D60285: Make calls into the pthread library use weak symbols..

@kledzik

Nick, what do you think about adding weak symbols just for achieving this?

Nick any thoughts? I'd like to move forward, for whatever definition of "forward" we may settle on.

Apr 18 2019, 1:23 PM · Restricted Project

Mar 20 2019

mtrent committed rG02a2ce9a4b55: Fix Mach-O bind and rebase validation errors in libObject (authored by mtrent).
Fix Mach-O bind and rebase validation errors in libObject
Mar 20 2019, 4:21 PM
mtrent committed rL356629: Fix Mach-O bind and rebase validation errors in libObject.
Fix Mach-O bind and rebase validation errors in libObject
Mar 20 2019, 4:20 PM
mtrent closed D59574: Fix Mach-O bind and rebase validation errors in libObject.
Mar 20 2019, 4:20 PM · Restricted Project
mtrent added inline comments to D59574: Fix Mach-O bind and rebase validation errors in libObject.
Mar 20 2019, 3:54 PM · Restricted Project

Mar 19 2019

mtrent created D59574: Fix Mach-O bind and rebase validation errors in libObject.
Mar 19 2019, 9:52 PM · Restricted Project

Mar 11 2019

mtrent committed rG76d66123b27d: Detect malformed LC_LINKER_COMMANDs in Mach-O binaries (authored by mtrent).
Detect malformed LC_LINKER_COMMANDs in Mach-O binaries
Mar 11 2019, 11:32 AM
mtrent committed rL355851: Detect malformed LC_LINKER_COMMANDs in Mach-O binaries.
Detect malformed LC_LINKER_COMMANDs in Mach-O binaries
Mar 11 2019, 11:31 AM
mtrent closed D59179: Detect malformed LC_LINKER_COMMANDs in Mach-O binaries.
Mar 11 2019, 11:31 AM · Restricted Project

Mar 9 2019

mtrent created D59179: Detect malformed LC_LINKER_COMMANDs in Mach-O binaries.
Mar 9 2019, 12:10 PM · Restricted Project

Mar 6 2019

mtrent added a comment to D58636: [BinaryFormat] Update Mach-O ARM64E CPU subtype and dumping.

Ping.

Mar 6 2019, 2:53 PM · Restricted Project

Feb 26 2019

mtrent requested changes to D58636: [BinaryFormat] Update Mach-O ARM64E CPU subtype and dumping.

I agree, simply updating the enum by itself doesn't accomplish much. Is there something specific driving this change?

Feb 26 2019, 3:00 PM · Restricted Project

Feb 22 2019

mtrent accepted D58263: Compute and Print Type and Section columns in "llvm-nm -f sysv" output..

Built it locally, stepped through the nm code for Mach-O files, didn't see any unintended problems. Elf changes reviewed visually only, they look mechanical. The name for "getNMSectionTagAndName" seems imperfect to me, as the Mach-O symbol type code isn't strictly about the section (A, I, -); that said, sysv is not a common format for viewing Mach-O, so I just offer it as a minor point to consider.

Feb 22 2019, 11:16 PM · Restricted Project
mtrent committed rG7dcfac617122: objdump fails to parse Mach-O binaries with n_desc bearing stabs (authored by mtrent).
objdump fails to parse Mach-O binaries with n_desc bearing stabs
Feb 22 2019, 10:21 PM
mtrent committed rL354722: objdump fails to parse Mach-O binaries with n_desc bearing stabs.
objdump fails to parse Mach-O binaries with n_desc bearing stabs
Feb 22 2019, 10:20 PM
mtrent closed D58568: objdump fails to parse Mach-O binaries with n_desc bearing stabs.
Feb 22 2019, 10:20 PM · Restricted Project
mtrent created D58568: objdump fails to parse Mach-O binaries with n_desc bearing stabs.
Feb 22 2019, 5:49 PM · Restricted Project

Feb 11 2019

mtrent abandoned D58058: llvm-objdump -macho -objc-meta-data should print body of protocols in protolist.

Crud! The wrong code got into this arc request. I'm going to abandon the revision and try again.

Feb 11 2019, 8:45 PM · Restricted Project
mtrent added a comment to D58058: llvm-objdump -macho -objc-meta-data should print body of protocols in protolist.

LGTM.

Looks like we can have print_protocol_list64_t also call the new print_protocol_64_t, but that can be done in a later NFC commit.

Feb 11 2019, 2:22 PM · Restricted Project
mtrent updated the diff for D58058: llvm-objdump -macho -objc-meta-data should print body of protocols in protolist.

... and fix the lit test when always printing the imp pointer.

Feb 11 2019, 2:19 PM · Restricted Project
mtrent updated the diff for D58058: llvm-objdump -macho -objc-meta-data should print body of protocols in protolist.

Always print the imp pointer.

Feb 11 2019, 2:15 PM · Restricted Project
mtrent created D58058: llvm-objdump -macho -objc-meta-data should print body of protocols in protolist.
Feb 11 2019, 8:52 AM · Restricted Project

Jan 25 2019

mtrent reopened D57190: [MC] Teach the MachO object writer about N_FUNC_COLD.
Jan 25 2019, 4:25 PM

Jan 24 2019

mtrent accepted D57190: [MC] Teach the MachO object writer about N_FUNC_COLD.
Jan 24 2019, 4:58 PM
mtrent added a comment to D57190: [MC] Teach the MachO object writer about N_FUNC_COLD.

llvm-nm and BinaryFormat changes look good to me.

Jan 24 2019, 4:58 PM
mtrent committed rL352104: Limit dyld image suffixes guessed by guessLibraryShortName().
Limit dyld image suffixes guessed by guessLibraryShortName()
Jan 24 2019, 1:00 PM
mtrent closed D56978: Limit dyld image suffixes guessed by guessLibraryShortName().
Jan 24 2019, 1:00 PM

Jan 20 2019

mtrent created D56978: Limit dyld image suffixes guessed by guessLibraryShortName().
Jan 20 2019, 10:48 AM

Jan 15 2019

mtrent committed rL351238: llvm-objdump -m -D should disassemble all text segments.
llvm-objdump -m -D should disassemble all text segments
Jan 15 2019, 12:45 PM
mtrent closed D56649: llvm-objdump -m -D should disassemble all text segments.
Jan 15 2019, 12:45 PM