[PATCH 3/3][PR binutils/23728][PR gdb/23742][PR binutils/23746] Update macOS load commands: Add LC_BUILD_VERSION load command

Saagar Jha saagar@saagarjha.com
Sun Oct 28 03:56:00 GMT 2018


This patch contains preliminary support for the LC_BUILD_VERSION load command, which seems to be similar to the LC_VERSION_MIN_* commands but extended with platform and build tool information. As it stands currently, the load command is only partially read in; in particular, the command contains a variable-size list of “tools” used to compile the executable that I couldn’t figure out a way to embed into a fixed-size struct on the stack. I was considering allocating memory here and storing this in a pointer in bfd_mach_o_build_version_command, but I couldn’t really figure out which allocator to use (bfd/mach-o.c seems to use several in the same file) or when to free the allocated memory. Is there a way to implement this in the way version commands are currently structured?

Regards,
Saagar Jha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Add-LC_BUILD_VERSION-load-command.patch
Type: application/octet-stream
Size: 7517 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20181028/67cbe1c7/attachment.obj>
-------------- next part --------------



More information about the Binutils mailing list