From 7da94a8f0169b416b14521bc9c78f17029e9e1a2 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Mon, 10 Jun 2024 18:56:50 +0100 Subject: [PATCH] Preliminary macOS 15 (Sequoia) support --- Library/Homebrew/Gemfile.lock | 2 +- Library/Homebrew/linkage_checker.rb | 2 +- Library/Homebrew/macos_version.rb | 1 + Library/Homebrew/os/mac/mach.rb | 3 +- Library/Homebrew/os/mac/pkgconfig/15/expat.pc | 14 + .../Homebrew/os/mac/pkgconfig/15/libcurl.pc | 42 ++ .../Homebrew/os/mac/pkgconfig/15/libedit.pc | 12 + .../Homebrew/os/mac/pkgconfig/15/libexslt.pc | 14 + .../Homebrew/os/mac/pkgconfig/15/libffi.pc | 12 + .../os/mac/pkgconfig/15/libxml-2.0.pc | 14 + .../Homebrew/os/mac/pkgconfig/15/libxslt.pc | 14 + .../Homebrew/os/mac/pkgconfig/15/ncurses.pc | 17 + .../Homebrew/os/mac/pkgconfig/15/ncursesw.pc | 17 + .../Homebrew/os/mac/pkgconfig/15/sqlite3.pc | 12 + Library/Homebrew/os/mac/pkgconfig/15/uuid.pc | 14 + Library/Homebrew/os/mac/pkgconfig/15/zlib.pc | 14 + Library/Homebrew/os/mac/xcode.rb | 17 +- ...y-macho@4.0.1.rbi => ruby-macho@4.1.0.rbi} | 419 ++++++++++-------- ...all_bottle-0.1.arm64_sequoia.bottle.tar.gz | 1 + .../testball_bottle-0.1.sequoia.bottle.tar.gz | 1 + .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../LICENSE | 0 .../lib/macho.rb | 2 +- .../lib/macho/exceptions.rb | 0 .../lib/macho/fat_file.rb | 0 .../lib/macho/headers.rb | 0 .../lib/macho/load_commands.rb | 105 ++++- .../lib/macho/macho_file.rb | 0 .../lib/macho/sections.rb | 0 .../lib/macho/structure.rb | 0 .../lib/macho/tools.rb | 0 .../lib/macho/utils.rb | 0 .../lib/macho/view.rb | 0 33 files changed, 564 insertions(+), 187 deletions(-) create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/expat.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/libcurl.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/libedit.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/libexslt.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/libffi.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/libxml-2.0.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/libxslt.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/ncurses.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/ncursesw.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/sqlite3.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/uuid.pc create mode 100644 Library/Homebrew/os/mac/pkgconfig/15/zlib.pc rename Library/Homebrew/sorbet/rbi/gems/{ruby-macho@4.0.1.rbi => ruby-macho@4.1.0.rbi} (91%) create mode 120000 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.arm64_sequoia.bottle.tar.gz create mode 120000 Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sequoia.bottle.tar.gz rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/LICENSE (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/exceptions.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/fat_file.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/headers.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/load_commands.rb (92%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/macho_file.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/sections.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/structure.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/tools.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/utils.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/{ruby-macho-4.0.1 => ruby-macho-4.1.0}/lib/macho/view.rb (100%) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 2e5de0a93c80e..d669ebd3c85c3 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -111,7 +111,7 @@ GEM rubocop (~> 1.40) rubocop-sorbet (0.8.3) rubocop (>= 0.90.0) - ruby-macho (4.0.1) + ruby-macho (4.1.0) ruby-prof (1.7.0) ruby-progressbar (1.13.0) simplecov (0.22.0) diff --git a/Library/Homebrew/linkage_checker.rb b/Library/Homebrew/linkage_checker.rb index 6abbde82dd994..2250e1a90a28c 100644 --- a/Library/Homebrew/linkage_checker.rb +++ b/Library/Homebrew/linkage_checker.rb @@ -112,7 +112,7 @@ def check_dylibs(rebuild_cache:) # weakly loaded dylibs may not actually exist on disk, so skip them # when checking for broken linkage keg_files_dylibs[file] = - file.dynamically_linked_libraries(except: :LC_LOAD_WEAK_DYLIB) + file.dynamically_linked_libraries(except: :DYLIB_USE_WEAK_LINK) end end diff --git a/Library/Homebrew/macos_version.rb b/Library/Homebrew/macos_version.rb index 9fad6cd11914f..7b4502db2ef2e 100644 --- a/Library/Homebrew/macos_version.rb +++ b/Library/Homebrew/macos_version.rb @@ -19,6 +19,7 @@ def initialize(version) # NOTE: When removing symbols here, ensure that they are added # to `DEPRECATED_MACOS_VERSIONS` in `MacOSRequirement`. SYMBOLS = { + sequoia: "15", sonoma: "14", ventura: "13", monterey: "12", diff --git a/Library/Homebrew/os/mac/mach.rb b/Library/Homebrew/os/mac/mach.rb index b344cf6c79474..bb5893e672ce9 100644 --- a/Library/Homebrew/os/mac/mach.rb +++ b/Library/Homebrew/os/mac/mach.rb @@ -86,7 +86,8 @@ def change_install_name(old, new, **options) end def dynamically_linked_libraries(except: :none, resolve_variable_references: true) - lcs = macho.dylib_load_commands.reject { |lc| lc.type == except } + lcs = macho.dylib_load_commands + lcs.reject! { |lc| lc.flag?(except) } if except != :none names = lcs.map { |lc| lc.name.to_s }.uniq names.map! { resolve_variable_name(_1) } if resolve_variable_references diff --git a/Library/Homebrew/os/mac/pkgconfig/15/expat.pc b/Library/Homebrew/os/mac/pkgconfig/15/expat.pc new file mode 100644 index 0000000000000..0160794162aa9 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/expat.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: expat +Version: 2.6.1 +Description: expat XML parser +URL: https://libexpat.github.io/ +Libs: -L${libdir} -lexpat +Libs.private: +Cflags: +Cflags.private: -DXML_STATIC diff --git a/Library/Homebrew/os/mac/pkgconfig/15/libcurl.pc b/Library/Homebrew/os/mac/pkgconfig/15/libcurl.pc new file mode 100644 index 0000000000000..2cefe367b545a --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/libcurl.pc @@ -0,0 +1,42 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# SPDX-License-Identifier: curl +# +########################################################################### + +# This should most probably benefit from getting a "Requires:" field added +# dynamically by configure. +# +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +supported_protocols="DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS IPFS IPNS LDAP LDAPS MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP" +supported_features="alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets" + +Name: libcurl +URL: https://curl.se/ +Description: Library to transfer files with ftp, http, etc. +Version: 8.7.1 +Libs: -L${libdir} -lcurl +Libs.private: -lldap -lz +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/15/libedit.pc b/Library/Homebrew/os/mac/pkgconfig/15/libedit.pc new file mode 100644 index 0000000000000..b9e29b70c92ee --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/libedit.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libedit +Description: command line editor library provides generic line editing, history, and tokenization functions. +Version: 3.0 +Requires: +Libs: -L${libdir} -ledit +Cflags: -I${includedir}/editline diff --git a/Library/Homebrew/os/mac/pkgconfig/15/libexslt.pc b/Library/Homebrew/os/mac/pkgconfig/15/libexslt.pc new file mode 100644 index 0000000000000..e06b1fded2a0b --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/libexslt.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: libexslt +Version: 0.8.20 +Description: EXSLT Extension library +Requires: libxml-2.0, libxslt +Cflags: +Libs: -L${libdir} -lexslt +Libs.private: diff --git a/Library/Homebrew/os/mac/pkgconfig/15/libffi.pc b/Library/Homebrew/os/mac/pkgconfig/15/libffi.pc new file mode 100644 index 0000000000000..07442f421f3f6 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/libffi.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +toolexeclibdir=${libdir} +includedir=${prefix}/include/ffi + +Name: libffi +Description: Library supporting Foreign Function Interfaces +Version: 3.4-rc1 +Libs: -L${toolexeclibdir} -lffi +Cflags: -I${includedir} diff --git a/Library/Homebrew/os/mac/pkgconfig/15/libxml-2.0.pc b/Library/Homebrew/os/mac/pkgconfig/15/libxml-2.0.pc new file mode 100644 index 0000000000000..211dcdd03b64a --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/libxml-2.0.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +modules=1 + +Name: libXML +Version: 2.9.13 +Description: libXML library version2. +Requires: +Libs: -L${libdir} -lxml2 +Libs.private: -lz -lpthread -licucore -lm +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/15/libxslt.pc b/Library/Homebrew/os/mac/pkgconfig/15/libxslt.pc new file mode 100644 index 0000000000000..cdb0bab9d7dc2 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/libxslt.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: libxslt +Version: 1.1.35 +Description: XSLT library version 2. +Requires: libxml-2.0 +Cflags: +Libs: -L${libdir} -lxslt +Libs.private: diff --git a/Library/Homebrew/os/mac/pkgconfig/15/ncurses.pc b/Library/Homebrew/os/mac/pkgconfig/15/ncurses.pc new file mode 100644 index 0000000000000..abeb1e0bdba92 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/ncurses.pc @@ -0,0 +1,17 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +abi_version=5.4 +major_version=6 +version=6.0.20150808 + +Name: ncurses +Description: ncurses 6.0 library +Version: ${version} +URL: http://invisible-island.net/ncurses +Requires.private: +Libs: -L${libdir} -lncurses +Libs.private: +Cflags: -D_DARWIN_C_SOURCE diff --git a/Library/Homebrew/os/mac/pkgconfig/15/ncursesw.pc b/Library/Homebrew/os/mac/pkgconfig/15/ncursesw.pc new file mode 100644 index 0000000000000..282d60ae91343 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/ncursesw.pc @@ -0,0 +1,17 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include +abi_version=5.4 +major_version=6 +version=6.0.20150808 + +Name: ncursesw +Description: ncurses 6.0 library +Version: ${version} +URL: http://invisible-island.net/ncurses +Requires.private: +Libs: -L${libdir} -lncurses +Libs.private: +Cflags: -D_DARWIN_C_SOURCE diff --git a/Library/Homebrew/os/mac/pkgconfig/15/sqlite3.pc b/Library/Homebrew/os/mac/pkgconfig/15/sqlite3.pc new file mode 100644 index 0000000000000..e054da03ea3c3 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/sqlite3.pc @@ -0,0 +1,12 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: SQLite +Description: SQL database engine +Version: 3.43.2 +Libs: -L${libdir} -lsqlite3 +Libs.private: +Cflags: diff --git a/Library/Homebrew/os/mac/pkgconfig/15/uuid.pc b/Library/Homebrew/os/mac/pkgconfig/15/uuid.pc new file mode 100644 index 0000000000000..06ff8ce3971ea --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/uuid.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include/uuid + +Name: uuid +Description: Universally unique id library +Version: 1.0 + +Requires: +Libs: +Cflags: -I${includedir} diff --git a/Library/Homebrew/os/mac/pkgconfig/15/zlib.pc b/Library/Homebrew/os/mac/pkgconfig/15/zlib.pc new file mode 100644 index 0000000000000..d2be681dbfd89 --- /dev/null +++ b/Library/Homebrew/os/mac/pkgconfig/15/zlib.pc @@ -0,0 +1,14 @@ +homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk +prefix=${homebrew_sdkroot}/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include + +Name: zlib +Description: zlib compression library +Version: 1.2.12 + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index eebf3d7b44af3..584872212e40d 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -15,9 +15,11 @@ module Xcode # This may be a beta version for a beta macOS. sig { params(macos: MacOSVersion).returns(String) } def self.latest_version(macos: MacOS.version) - latest_stable = "15.1" + latest_stable = "15.4" case macos - when "14", "13" then latest_stable + when "15" then "16.0" + when "14" then latest_stable + when "13" then "15.2" when "12" then "14.2" when "11" then "13.2.1" when "10.15" then "12.4" @@ -40,6 +42,7 @@ def self.latest_version(macos: MacOS.version) sig { returns(String) } def self.minimum_version case MacOS.version + when "15" then "16.0" when "14" then "15.0" when "13" then "14.1" when "12" then "13.1" @@ -253,8 +256,9 @@ def self.detect_version_from_clang_version when "13.0.0" then "13.2.1" when "13.1.6" then "13.4.1" when "14.0.0" then "14.2" - when "15.0.0" then "15.1" - else "14.3" + when "14.0.3" then "14.3.1" + when "16.0.0" then "16.0" + else "15.4" end end @@ -347,7 +351,9 @@ def self.update_instructions sig { returns(String) } def self.latest_clang_version case MacOS.version - when "14", "13" then "1500.1.0.2.5" + when "15" then "1600.0.20.10" + when "14" then "1500.3.9.4" + when "13" then "1500.1.0.2.5" when "12" then "1400.0.29.202" when "11" then "1300.0.29.30" when "10.15" then "1200.0.32.29" @@ -364,6 +370,7 @@ def self.latest_clang_version sig { returns(String) } def self.minimum_version case MacOS.version + when "15" then "16.0.0" when "14" then "15.0.0" when "13" then "14.0.0" when "12" then "13.0.0" diff --git a/Library/Homebrew/sorbet/rbi/gems/ruby-macho@4.0.1.rbi b/Library/Homebrew/sorbet/rbi/gems/ruby-macho@4.1.0.rbi similarity index 91% rename from Library/Homebrew/sorbet/rbi/gems/ruby-macho@4.0.1.rbi rename to Library/Homebrew/sorbet/rbi/gems/ruby-macho@4.1.0.rbi index af14c57171299..943f1e37cc8e9 100644 --- a/Library/Homebrew/sorbet/rbi/gems/ruby-macho@4.0.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/ruby-macho@4.1.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `ruby-macho` gem. # Please instead update this file by running `bin/tapioca gem ruby-macho`. + # The primary namespace for ruby-macho. # # source://ruby-macho//lib/macho/utils.rb#3 @@ -36,7 +37,7 @@ end # Raised when the CPU type/sub-type pair is unknown. # -# source://ruby-macho//lib/macho/exceptions.rb#106 +# source://ruby-macho//lib/macho/exceptions.rb#104 class MachO::CPUSubtypeError < ::MachO::MachOError # @param cputype [Integer] the CPU type of the unknown pair # @param cpusubtype [Integer] the CPU sub-type of the unknown pair @@ -48,7 +49,7 @@ end # Raised when the CPU type is unknown. # -# source://ruby-macho//lib/macho/exceptions.rb#97 +# source://ruby-macho//lib/macho/exceptions.rb#96 class MachO::CPUTypeError < ::MachO::MachOError # @param cputype [Integer] the unknown CPU type # @return [CPUTypeError] a new instance of CPUTypeError @@ -98,7 +99,7 @@ end # Raised when attempting to change a dylib name that doesn't exist. # -# source://ruby-macho//lib/macho/exceptions.rb#186 +# source://ruby-macho//lib/macho/exceptions.rb#185 class MachO::DylibUnknownError < ::MachO::RecoverableModificationError # @param dylib [String] the unknown shared library name # @return [DylibUnknownError] a new instance of DylibUnknownError @@ -110,7 +111,7 @@ end # Raised when attempting to create a {FatFile} from one or more {MachOFile}s # whose offsets will not fit within the resulting 32-bit {Headers::FatArch#offset} fields. # -# source://ruby-macho//lib/macho/exceptions.rb#226 +# source://ruby-macho//lib/macho/exceptions.rb#225 class MachO::FatArchOffsetOverflowError < ::MachO::MachOError # @param offset [Integer] the offending offset # @return [FatArchOffsetOverflowError] a new instance of FatArchOffsetOverflowError @@ -163,7 +164,7 @@ class MachO::FatFile # @return [Boolean] whether or not the file is of type `MH_BUNDLE` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def bundle?(*args, **_arg1, &block); end # Changes all dependent shared library install names from `old_name` to @@ -228,7 +229,7 @@ class MachO::FatFile # @return [Boolean] whether or not the file is of type `MH_CORE` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def core?(*args, **_arg1, &block); end # Delete the given runtime path from the file's Mach-Os. @@ -245,17 +246,17 @@ class MachO::FatFile # @return [Boolean] whether or not the file is of type `MH_DSYM` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dsym?(*args, **_arg1, &block); end # @return [Boolean] whether or not the file is of type `MH_DYLIB` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dylib?(*args, **_arg1, &block); end # @return [String, nil] the Mach-O's dylib ID # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dylib_id(*args, **_arg1, &block); end # Changes the file's dylib ID to `new_id`. If the file is not a dylib, @@ -282,12 +283,12 @@ class MachO::FatFile # @return [Boolean] whether or not the file is of type `MH_DYLINKER` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dylinker?(*args, **_arg1, &block); end # @return [Boolean] whether or not the file is of type `MH_EXECUTE` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def executable?(*args, **_arg1, &block); end # Extract a Mach-O with the given CPU type from the file. @@ -317,12 +318,12 @@ class MachO::FatFile # @return [Symbol] a string representation of the Mach-O's filetype # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def filetype(*args, **_arg1, &block); end # @return [Boolean] whether or not the file is of type `MH_FVMLIB` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fvmlib?(*args, **_arg1, &block); end # @return [Headers::FatHeader] the file's header @@ -340,7 +341,7 @@ class MachO::FatFile # @return [Boolean] whether or not the file is of type `MH_KEXT_BUNDLE` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def kext?(*args, **_arg1, &block); end # All shared libraries linked to the file's Mach-Os. @@ -358,7 +359,7 @@ class MachO::FatFile # @return [Integer] the magic number of the header (and file) # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def magic(*args, **_arg1, &block); end # @return [String] a string representation of the file's magic number @@ -368,7 +369,7 @@ class MachO::FatFile # @return [Boolean] whether or not the file is of type `MH_OBJECT` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def object?(*args, **_arg1, &block); end # @note Options specified in a {FatFile} trickle down into the internal {MachOFile}s. @@ -387,7 +388,7 @@ class MachO::FatFile # @return [Boolean] whether or not the file is of type `MH_PRELOAD` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def preload?(*args, **_arg1, &block); end # All runtime paths associated with the file's Mach-Os. @@ -515,7 +516,7 @@ end # Raised when a mach-o file's filetype field is unknown. # -# source://ruby-macho//lib/macho/exceptions.rb#115 +# source://ruby-macho//lib/macho/exceptions.rb#114 class MachO::FiletypeError < ::MachO::MachOError # @param num [Integer] the unknown number # @return [FiletypeError] a new instance of FiletypeError @@ -526,7 +527,7 @@ end # Raised when load commands are too large to fit in the current file. # -# source://ruby-macho//lib/macho/exceptions.rb#176 +# source://ruby-macho//lib/macho/exceptions.rb#175 class MachO::HeaderPadError < ::MachO::ModificationError # @param filename [String] the filename # @return [HeaderPadError] a new instance of HeaderPadError @@ -1060,7 +1061,7 @@ MachO::Headers::FAT_MAGIC_64 = T.let(T.unsafe(nil), Integer) # Mach-Os that it points to necessarily *are* 32-bit. # @see MachO::Headers::FatHeader # -# source://ruby-macho//lib/macho/headers.rb#534 +# source://ruby-macho//lib/macho/headers.rb#533 class MachO::Headers::FatArch < ::MachO::MachOStructure # @return [Integer] the alignment, as a power of 2 # @@ -1105,7 +1106,7 @@ end # Mach-Os that it points to necessarily *are* 64-bit. # @see MachO::Headers::FatHeader # -# source://ruby-macho//lib/macho/headers.rb#574 +# source://ruby-macho//lib/macho/headers.rb#573 class MachO::Headers::FatArch64 < ::MachO::Headers::FatArch # @return [Integer] the file offset to the beginning of the Mach-O data # @@ -1137,7 +1138,7 @@ end # # @see MachO::FatArch # -# source://ruby-macho//lib/macho/headers.rb#507 +# source://ruby-macho//lib/macho/headers.rb#506 class MachO::Headers::FatHeader < ::MachO::MachOStructure # @return [Integer] the magic number of the header (and file) # @@ -1296,7 +1297,7 @@ MachO::Headers::MH_PRELOAD = T.let(T.unsafe(nil), Integer) # 32-bit Mach-O file header structure # -# source://ruby-macho//lib/macho/headers.rb#598 +# source://ruby-macho//lib/macho/headers.rb#597 class MachO::Headers::MachHeader < ::MachO::MachOStructure # @return [Integer] the file's internal alignment # @@ -1419,7 +1420,7 @@ end # 64-bit Mach-O file header structure # -# source://ruby-macho//lib/macho/headers.rb#722 +# source://ruby-macho//lib/macho/headers.rb#721 class MachO::Headers::MachHeader64 < ::MachO::Headers::MachHeader # @return [void] # @@ -1434,7 +1435,7 @@ end # Prelinked kernel/"kernelcache" header structure # -# source://ruby-macho//lib/macho/headers.rb#735 +# source://ruby-macho//lib/macho/headers.rb#734 class MachO::Headers::PrelinkedKernelHeader < ::MachO::MachOStructure # @return [Integer] a checksum for the uncompressed data # @@ -1514,7 +1515,7 @@ end # Raised when a load command string is malformed in some way. # -# source://ruby-macho//lib/macho/exceptions.rb#159 +# source://ruby-macho//lib/macho/exceptions.rb#158 class MachO::LCStrMalformedError < ::MachO::MachOError # @param lc [MachO::LoadCommand] the load command containing the string # @return [LCStrMalformedError] a new instance of LCStrMalformedError @@ -1526,7 +1527,7 @@ end # Raised when the number of arguments used to create a load command manually # is wrong. # -# source://ruby-macho//lib/macho/exceptions.rb#142 +# source://ruby-macho//lib/macho/exceptions.rb#139 class MachO::LoadCommandCreationArityError < ::MachO::MachOError # @param cmd_sym [Symbol] the load command's symbol # @param expected_arity [Integer] the number of arguments expected @@ -1539,7 +1540,7 @@ end # Raised when an unknown load command is encountered. # -# source://ruby-macho//lib/macho/exceptions.rb#123 +# source://ruby-macho//lib/macho/exceptions.rb#122 class MachO::LoadCommandError < ::MachO::MachOError # @param num [Integer] the unknown number # @return [LoadCommandError] a new instance of LoadCommandError @@ -1550,7 +1551,7 @@ end # Raised when a load command can't be created manually. # -# source://ruby-macho//lib/macho/exceptions.rb#131 +# source://ruby-macho//lib/macho/exceptions.rb#130 class MachO::LoadCommandNotCreatableError < ::MachO::MachOError # @param cmd_sym [Symbol] the uncreatable load command's symbol # @return [LoadCommandNotCreatableError] a new instance of LoadCommandNotCreatableError @@ -1561,7 +1562,7 @@ end # Raised when a load command can't be serialized. # -# source://ruby-macho//lib/macho/exceptions.rb#151 +# source://ruby-macho//lib/macho/exceptions.rb#150 class MachO::LoadCommandNotSerializableError < ::MachO::MachOError # @param cmd_sym [Symbol] the load command's symbol # @return [LoadCommandNotSerializableError] a new instance of LoadCommandNotSerializableError @@ -1579,7 +1580,7 @@ module MachO::LoadCommands; end # the binary was built for its platform. # Corresponds to LC_BUILD_VERSION. # -# source://ruby-macho//lib/macho/load_commands.rb#1061 +# source://ruby-macho//lib/macho/load_commands.rb#1159 class MachO::LoadCommands::BuildVersionCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the minimum OS version X.Y.Z packed as x16.y8.z8 # @@ -1590,7 +1591,7 @@ class MachO::LoadCommands::BuildVersionCommand < ::MachO::LoadCommands::LoadComm # # @return [String] a string representing the minimum OS version. # - # source://ruby-macho//lib/macho/load_commands.rb#1075 + # source://ruby-macho//lib/macho/load_commands.rb#1174 def minos_string; end # @return [Integer] @@ -1607,12 +1608,12 @@ class MachO::LoadCommands::BuildVersionCommand < ::MachO::LoadCommands::LoadComm # # @return [String] a string representing the SDK version. # - # source://ruby-macho//lib/macho/load_commands.rb#1086 + # source://ruby-macho//lib/macho/load_commands.rb#1185 def sdk_string; end # @return [Hash] a hash representation of this {BuildVersionCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1096 + # source://ruby-macho//lib/macho/load_commands.rb#1195 def to_h; end # @return [ToolEntries] tool entries @@ -1624,47 +1625,47 @@ end # A representation of the tool versions exposed # by a {BuildVersionCommand} (`LC_BUILD_VERSION`). # -# source://ruby-macho//lib/macho/load_commands.rb#1109 +# source://ruby-macho//lib/macho/load_commands.rb#1208 class MachO::LoadCommands::BuildVersionCommand::ToolEntries # @api private # @param view [MachO::MachOView] the view into the current Mach-O # @param ntools [Integer] the number of tools # @return [ToolEntries] a new instance of ToolEntries # - # source://ruby-macho//lib/macho/load_commands.rb#1116 + # source://ruby-macho//lib/macho/load_commands.rb#1215 def initialize(view, ntools); end # @return [Array] all tools # - # source://ruby-macho//lib/macho/load_commands.rb#1111 + # source://ruby-macho//lib/macho/load_commands.rb#1210 def tools; end end # An individual tool. # -# source://ruby-macho//lib/macho/load_commands.rb#1125 +# source://ruby-macho//lib/macho/load_commands.rb#1224 class MachO::LoadCommands::BuildVersionCommand::ToolEntries::Tool # @api private # @param tool [Integer] 32-bit integer # @param version [Integer] 32-bit integer # @return [Tool] a new instance of Tool # - # source://ruby-macho//lib/macho/load_commands.rb#1135 + # source://ruby-macho//lib/macho/load_commands.rb#1234 def initialize(tool, version); end # @return [Hash] a hash representation of this {Tool} # - # source://ruby-macho//lib/macho/load_commands.rb#1141 + # source://ruby-macho//lib/macho/load_commands.rb#1240 def to_h; end # @return [Integer] the enum for the tool # - # source://ruby-macho//lib/macho/load_commands.rb#1127 + # source://ruby-macho//lib/macho/load_commands.rb#1226 def tool; end # @return [Integer] the tool's version number # - # source://ruby-macho//lib/macho/load_commands.rb#1130 + # source://ruby-macho//lib/macho/load_commands.rb#1229 def version; end end @@ -1672,21 +1673,36 @@ end # # @api private # -# source://ruby-macho//lib/macho/load_commands.rb#86 +# source://ruby-macho//lib/macho/load_commands.rb#87 MachO::LoadCommands::CREATABLE_LOAD_COMMANDS = T.let(T.unsafe(nil), Array) # load commands responsible for loading dylibs # # @api private # -# source://ruby-macho//lib/macho/load_commands.rb#76 +# source://ruby-macho//lib/macho/load_commands.rb#77 MachO::LoadCommands::DYLIB_LOAD_COMMANDS = T.let(T.unsafe(nil), Array) +# association of dylib use flag symbols to values +# +# @api private +# +# source://ruby-macho//lib/macho/load_commands.rb#200 +MachO::LoadCommands::DYLIB_USE_FLAGS = T.let(T.unsafe(nil), Hash) + +# the marker used to denote a newer style dylib use command. +# the value is the timestamp 24 January 1984 18:12:16 +# +# @api private +# +# source://ruby-macho//lib/macho/load_commands.rb#210 +MachO::LoadCommands::DYLIB_USE_MARKER = T.let(T.unsafe(nil), Integer) + # A load command containing the file offsets and sizes of the new # compressed form of the information dyld needs to load the image. # Corresponds to LC_DYLD_INFO and LC_DYLD_INFO_ONLY. # -# source://ruby-macho//lib/macho/load_commands.rb#1155 +# source://ruby-macho//lib/macho/load_commands.rb#1253 class MachO::LoadCommands::DyldInfoCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the file offset to the binding information # @@ -1730,7 +1746,7 @@ class MachO::LoadCommands::DyldInfoCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {DyldInfoCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1186 + # source://ruby-macho//lib/macho/load_commands.rb#1285 def to_h; end # @return [Integer] the file offset to the weak binding information @@ -1748,7 +1764,7 @@ end # on filetype. Corresponds to LC_ID_DYLIB, LC_LOAD_DYLIB, # LC_LOAD_WEAK_DYLIB, and LC_REEXPORT_DYLIB. # -# source://ruby-macho//lib/macho/load_commands.rb#517 +# source://ruby-macho//lib/macho/load_commands.rb#538 class MachO::LoadCommands::DylibCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the library's compatibility version number # @@ -1760,6 +1776,14 @@ class MachO::LoadCommands::DylibCommand < ::MachO::LoadCommands::LoadCommand # source://ruby-macho//lib/macho/structure.rb#269 def current_version; end + # @example + # puts "this dylib is weakly loaded" if dylib_command.flag?(:DYLIB_USE_WEAK_LINK) + # @param flag [Symbol] a dylib use command flag symbol + # @return [Boolean] true if `flag` applies to this dylib command + # + # source://ruby-macho//lib/macho/load_commands.rb#556 + def flag?(flag); end + # @return [LCStr] the library's path # name as an LCStr # @@ -1770,7 +1794,7 @@ class MachO::LoadCommands::DylibCommand < ::MachO::LoadCommands::LoadCommand # @param context [SerializationContext] the context # @return [String] the serialized fields of the load command # - # source://ruby-macho//lib/macho/load_commands.rb#533 + # source://ruby-macho//lib/macho/load_commands.rb#573 def serialize(context); end # @return [Integer] the library's build time stamp @@ -1780,18 +1804,65 @@ class MachO::LoadCommands::DylibCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {DylibCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#544 + # source://ruby-macho//lib/macho/load_commands.rb#584 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 def to_s; end end +# The newer format of load command representing some aspect of shared libraries, +# depending on filetype. Corresponds to LC_LOAD_DYLIB or LC_LOAD_WEAK_DYLIB. +# +# source://ruby-macho//lib/macho/load_commands.rb#596 +class MachO::LoadCommands::DylibUseCommand < ::MachO::LoadCommands::DylibCommand + # @example + # puts "this dylib is weakly loaded" if dylib_command.flag?(:DYLIB_USE_WEAK_LINK) + # @param flag [Symbol] a dylib use command flag symbol + # @return [Boolean] true if `flag` applies to this dylib command + # + # source://ruby-macho//lib/macho/load_commands.rb#623 + def flag?(flag); end + + # @return [Integer] any flags associated with this dylib use command + # + # source://ruby-macho//lib/macho/structure.rb#269 + def flags; end + + # source://ruby-macho//lib/macho/structure.rb#269 + def marker; end + + # @api private + # @param context [SerializationContext] the context + # @return [String] the serialized fields of the load command + # + # source://ruby-macho//lib/macho/load_commands.rb#635 + def serialize(context); end + + # @return [Hash] a hash representation of this {DylibUseCommand} + # + # source://ruby-macho//lib/macho/load_commands.rb#646 + def to_h; end + + class << self + # Instantiates a new DylibCommand or DylibUseCommand. + # macOS 15 and later use a new format for dylib commands (DylibUseCommand), + # which is determined based on a special timestamp and the name offset. + # + # @api private + # @param view [MachO::MachOView] the load command's raw view + # @return [DylibCommand] the new dylib load command + # + # source://ruby-macho//lib/macho/load_commands.rb#608 + def new_from_bin(view); end + end +end + # A load command representing some aspect of the dynamic linker, depending # on filetype. Corresponds to LC_ID_DYLINKER, LC_LOAD_DYLINKER, and # LC_DYLD_ENVIRONMENT. # -# source://ruby-macho//lib/macho/load_commands.rb#559 +# source://ruby-macho//lib/macho/load_commands.rb#656 class MachO::LoadCommands::DylinkerCommand < ::MachO::LoadCommands::LoadCommand # @return [LCStr] the dynamic linker's # path name as an LCStr @@ -1803,12 +1874,12 @@ class MachO::LoadCommands::DylinkerCommand < ::MachO::LoadCommands::LoadCommand # @param context [SerializationContext] the context # @return [String] the serialized fields of the load command # - # source://ruby-macho//lib/macho/load_commands.rb#566 + # source://ruby-macho//lib/macho/load_commands.rb#665 def serialize(context); end # @return [Hash] a hash representation of this {DylinkerCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#576 + # source://ruby-macho//lib/macho/load_commands.rb#675 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -1818,7 +1889,7 @@ end # A load command containing symbolic information needed to support data # structures used by the dynamic link editor. Corresponds to LC_DYSYMTAB. # -# source://ruby-macho//lib/macho/load_commands.rb#771 +# source://ruby-macho//lib/macho/load_commands.rb#869 class MachO::LoadCommands::DysymtabCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the file offset to the referenced symbol table # @@ -1907,7 +1978,7 @@ class MachO::LoadCommands::DysymtabCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {DysymtabCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#826 + # source://ruby-macho//lib/macho/load_commands.rb#925 def to_h; end # @return [Integer] the file offset to the table of contents @@ -1919,7 +1990,7 @@ end # A load command representing the offset to and size of an encrypted # segment. Corresponds to LC_ENCRYPTION_INFO. # -# source://ruby-macho//lib/macho/load_commands.rb#981 +# source://ruby-macho//lib/macho/load_commands.rb#1079 class MachO::LoadCommands::EncryptionInfoCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the encryption system, or 0 if not encrypted yet # @@ -1938,14 +2009,14 @@ class MachO::LoadCommands::EncryptionInfoCommand < ::MachO::LoadCommands::LoadCo # @return [Hash] a hash representation of this {EncryptionInfoCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#991 + # source://ruby-macho//lib/macho/load_commands.rb#1090 def to_h; end end # A load command representing the offset to and size of an encrypted # segment. Corresponds to LC_ENCRYPTION_INFO_64. # -# source://ruby-macho//lib/macho/load_commands.rb#1003 +# source://ruby-macho//lib/macho/load_commands.rb#1101 class MachO::LoadCommands::EncryptionInfoCommand64 < ::MachO::LoadCommands::EncryptionInfoCommand # @return [Integer] 64-bit padding value # @@ -1954,13 +2025,13 @@ class MachO::LoadCommands::EncryptionInfoCommand64 < ::MachO::LoadCommands::Encr # @return [Hash] a hash representation of this {EncryptionInfoCommand64} # - # source://ruby-macho//lib/macho/load_commands.rb#1007 + # source://ruby-macho//lib/macho/load_commands.rb#1106 def to_h; end end # A load command specifying the offset of main(). Corresponds to LC_MAIN. # -# source://ruby-macho//lib/macho/load_commands.rb#1218 +# source://ruby-macho//lib/macho/load_commands.rb#1316 class MachO::LoadCommands::EntryPointCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the file (__TEXT) offset of main() # @@ -1974,7 +2045,7 @@ class MachO::LoadCommands::EntryPointCommand < ::MachO::LoadCommands::LoadComman # @return [Hash] a hash representation of this {EntryPointCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1225 + # source://ruby-macho//lib/macho/load_commands.rb#1324 def to_h; end end @@ -1982,7 +2053,7 @@ end # Each entry is further described by its own Mach header. # Corresponds to LC_FILESET_ENTRY. # -# source://ruby-macho//lib/macho/load_commands.rb#1350 +# source://ruby-macho//lib/macho/load_commands.rb#1448 class MachO::LoadCommands::FilesetEntryCommand < ::MachO::LoadCommands::LoadCommand # @return [LCStr] the entry's ID # @@ -2001,12 +2072,12 @@ class MachO::LoadCommands::FilesetEntryCommand < ::MachO::LoadCommands::LoadComm # @return [SegmentCommand64, nil] the matching segment command or nil if nothing matches # - # source://ruby-macho//lib/macho/load_commands.rb#1373 + # source://ruby-macho//lib/macho/load_commands.rb#1472 def segment; end # @return [Hash] a hash representation of this {FilesetEntryCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1363 + # source://ruby-macho//lib/macho/load_commands.rb#1462 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2021,7 +2092,7 @@ end # An obsolete load command containing the path to a file to be loaded into # memory. Corresponds to LC_FVMFILE. # -# source://ruby-macho//lib/macho/load_commands.rb#1287 +# source://ruby-macho//lib/macho/load_commands.rb#1385 class MachO::LoadCommands::FvmfileCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the virtual address being loaded at # @@ -2035,7 +2106,7 @@ class MachO::LoadCommands::FvmfileCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {FvmfileCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1294 + # source://ruby-macho//lib/macho/load_commands.rb#1393 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2045,7 +2116,7 @@ end # An obsolete load command containing the path to a library to be loaded # into memory. Corresponds to LC_LOADFVMLIB and LC_IDFVMLIB. # -# source://ruby-macho//lib/macho/load_commands.rb#1305 +# source://ruby-macho//lib/macho/load_commands.rb#1403 class MachO::LoadCommands::FvmlibCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the library's header address # @@ -2064,7 +2135,7 @@ class MachO::LoadCommands::FvmlibCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {FvmlibCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1315 + # source://ruby-macho//lib/macho/load_commands.rb#1414 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2075,7 +2146,7 @@ end # string is null-terminated and the command is zero-padded to a multiple of # 4. Corresponds to LC_IDENT. # -# source://ruby-macho//lib/macho/load_commands.rb#1281 +# source://ruby-macho//lib/macho/load_commands.rb#1380 class MachO::LoadCommands::IdentCommand < ::MachO::LoadCommands::LoadCommand; end # load commands added after OS X 10.1 need to be bitwise ORed with @@ -2090,7 +2161,7 @@ MachO::LoadCommands::LC_REQ_DYLD = T.let(T.unsafe(nil), Integer) # # @api private # -# source://ruby-macho//lib/macho/load_commands.rb#94 +# source://ruby-macho//lib/macho/load_commands.rb#95 MachO::LoadCommands::LC_STRUCTURES = T.let(T.unsafe(nil), Hash) # association of load commands to symbol representations @@ -2104,16 +2175,16 @@ MachO::LoadCommands::LOAD_COMMANDS = T.let(T.unsafe(nil), Hash) # # @api private # -# source://ruby-macho//lib/macho/load_commands.rb#72 +# source://ruby-macho//lib/macho/load_commands.rb#73 MachO::LoadCommands::LOAD_COMMAND_CONSTANTS = T.let(T.unsafe(nil), Hash) # A load command representing the offsets and sizes of a blob of data in # the __LINKEDIT segment. Corresponds to LC_CODE_SIGNATURE, # LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE, # LC_DYLIB_CODE_SIGN_DRS, LC_LINKER_OPTIMIZATION_HINT, LC_DYLD_EXPORTS_TRIE, -# or LC_DYLD_CHAINED_FIXUPS. +# LC_DYLD_CHAINED_FIXUPS, or LC_ATOM_INFO. # -# source://ruby-macho//lib/macho/load_commands.rb#963 +# source://ruby-macho//lib/macho/load_commands.rb#1061 class MachO::LoadCommands::LinkeditDataCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] offset to the data in the __LINKEDIT segment # @@ -2127,14 +2198,14 @@ class MachO::LoadCommands::LinkeditDataCommand < ::MachO::LoadCommands::LoadComm # @return [Hash] a hash representation of this {LinkeditDataCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#970 + # source://ruby-macho//lib/macho/load_commands.rb#1069 def to_h; end end # A load command containing linker options embedded in object files. # Corresponds to LC_LINKER_OPTION. # -# source://ruby-macho//lib/macho/load_commands.rb#1205 +# source://ruby-macho//lib/macho/load_commands.rb#1303 class MachO::LoadCommands::LinkerOptionCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the number of strings # @@ -2143,7 +2214,7 @@ class MachO::LoadCommands::LinkerOptionCommand < ::MachO::LoadCommands::LoadComm # @return [Hash] a hash representation of this {LinkerOptionCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1209 + # source://ruby-macho//lib/macho/load_commands.rb#1308 def to_h; end end @@ -2152,7 +2223,7 @@ end # This is the most generic load command -- only the type ID and size are # represented. Used when a more specific class isn't available or isn't implemented. # -# source://ruby-macho//lib/macho/load_commands.rb#202 +# source://ruby-macho//lib/macho/load_commands.rb#216 class MachO::LoadCommands::LoadCommand < ::MachO::MachOStructure # @return [Integer] the load command's type ID # @@ -2167,12 +2238,12 @@ class MachO::LoadCommands::LoadCommand < ::MachO::MachOStructure # @deprecated use {#view} instead # @return [Integer] the load command's offset in the source file # - # source://ruby-macho//lib/macho/load_commands.rb#258 + # source://ruby-macho//lib/macho/load_commands.rb#281 def offset; end # @return [Boolean] whether the load command can be serialized # - # source://ruby-macho//lib/macho/load_commands.rb#240 + # source://ruby-macho//lib/macho/load_commands.rb#263 def serializable?; end # @api private @@ -2182,31 +2253,31 @@ class MachO::LoadCommands::LoadCommand < ::MachO::MachOStructure # @return [String, nil] the serialized fields of the load command, or nil # if the load command can't be serialized # - # source://ruby-macho//lib/macho/load_commands.rb#249 + # source://ruby-macho//lib/macho/load_commands.rb#272 def serialize(context); end # @note Children should override this to include additional information. # @return [Hash] a hash representation of this load command # - # source://ruby-macho//lib/macho/load_commands.rb#278 + # source://ruby-macho//lib/macho/load_commands.rb#301 def to_h; end # @return [String] a string representation of the load command's # identifying number # - # source://ruby-macho//lib/macho/load_commands.rb#272 + # source://ruby-macho//lib/macho/load_commands.rb#295 def to_s; end # @return [Symbol, nil] a symbol representation of the load command's # type ID, or nil if the ID doesn't correspond to a known load command class # - # source://ruby-macho//lib/macho/load_commands.rb#264 + # source://ruby-macho//lib/macho/load_commands.rb#287 def to_sym; end # @return [Symbol, nil] a symbol representation of the load command's # type ID, or nil if the ID doesn't correspond to a known load command class # - # source://ruby-macho//lib/macho/load_commands.rb#264 + # source://ruby-macho//lib/macho/load_commands.rb#287 def type; end # @return [MachO::MachOView, nil] the raw view associated with the load command, @@ -2222,7 +2293,7 @@ class MachO::LoadCommands::LoadCommand < ::MachO::MachOStructure # @param args [Array] the arguments for the load command being created # @raise [LoadCommandNotCreatableError] # - # source://ruby-macho//lib/macho/load_commands.rb#225 + # source://ruby-macho//lib/macho/load_commands.rb#241 def create(cmd_sym, *args); end # Instantiates a new LoadCommand given a view into its origin Mach-O @@ -2231,7 +2302,7 @@ class MachO::LoadCommands::LoadCommand < ::MachO::MachOStructure # @param view [MachO::MachOView] the load command's raw view # @return [LoadCommand] the new load command # - # source://ruby-macho//lib/macho/load_commands.rb#215 + # source://ruby-macho//lib/macho/load_commands.rb#231 def new_from_bin(view); end end end @@ -2241,7 +2312,7 @@ end # pretend that strings stored in LCs are immediately available without # explicit operations on the raw Mach-O data. # -# source://ruby-macho//lib/macho/load_commands.rb#291 +# source://ruby-macho//lib/macho/load_commands.rb#314 class MachO::LoadCommands::LoadCommand::LCStr # @api private # @param lc [LoadCommand] the load command @@ -2253,48 +2324,48 @@ class MachO::LoadCommands::LoadCommand::LCStr # interpreted differently depending on `lc.view`. The current behavior # is a hack to allow viewless load command creation. # - # source://ruby-macho//lib/macho/load_commands.rb#300 + # source://ruby-macho//lib/macho/load_commands.rb#323 def initialize(lc, lc_str); end # @return [Hash] a hash representation of this {LCStr}. # - # source://ruby-macho//lib/macho/load_commands.rb#330 + # source://ruby-macho//lib/macho/load_commands.rb#353 def to_h; end # @return [Integer] the offset to the beginning of the string in the # load command # - # source://ruby-macho//lib/macho/load_commands.rb#325 + # source://ruby-macho//lib/macho/load_commands.rb#348 def to_i; end # @return [String] a string representation of the LCStr # - # source://ruby-macho//lib/macho/load_commands.rb#319 + # source://ruby-macho//lib/macho/load_commands.rb#342 def to_s; end end # Represents the contextual information needed by a load command to # serialize itself correctly into a binary string. # -# source://ruby-macho//lib/macho/load_commands.rb#340 +# source://ruby-macho//lib/macho/load_commands.rb#363 class MachO::LoadCommands::LoadCommand::SerializationContext # @api private # @param endianness [Symbol] the endianness of the context # @param alignment [Integer] the alignment of the context # @return [SerializationContext] a new instance of SerializationContext # - # source://ruby-macho//lib/macho/load_commands.rb#358 + # source://ruby-macho//lib/macho/load_commands.rb#381 def initialize(endianness, alignment); end # @return [Integer] the constant alignment value used to pad the # serialized load command # - # source://ruby-macho//lib/macho/load_commands.rb#346 + # source://ruby-macho//lib/macho/load_commands.rb#369 def alignment; end # @return [Symbol] the endianness of the serialized load command # - # source://ruby-macho//lib/macho/load_commands.rb#342 + # source://ruby-macho//lib/macho/load_commands.rb#365 def endianness; end class << self @@ -2302,7 +2373,7 @@ class MachO::LoadCommands::LoadCommand::SerializationContext # @return [SerializationContext] the # resulting context # - # source://ruby-macho//lib/macho/load_commands.rb#351 + # source://ruby-macho//lib/macho/load_commands.rb#374 def context_for(macho); end end end @@ -2310,7 +2381,7 @@ end # A load command containing an owner name and offset/size for an arbitrary data region. # Corresponds to LC_NOTE. # -# source://ruby-macho//lib/macho/load_commands.rb#1327 +# source://ruby-macho//lib/macho/load_commands.rb#1425 class MachO::LoadCommands::NoteCommand < ::MachO::LoadCommands::LoadCommand # @return [String] the name of the owner for this note # @@ -2329,7 +2400,7 @@ class MachO::LoadCommands::NoteCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {NoteCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1337 + # source://ruby-macho//lib/macho/load_commands.rb#1436 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2339,7 +2410,7 @@ end # A load command containing the value of the original checksum for prebound # files, or zero. Corresponds to LC_PREBIND_CKSUM. # -# source://ruby-macho//lib/macho/load_commands.rb#919 +# source://ruby-macho//lib/macho/load_commands.rb#1017 class MachO::LoadCommands::PrebindCksumCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the checksum or 0 # @@ -2348,14 +2419,14 @@ class MachO::LoadCommands::PrebindCksumCommand < ::MachO::LoadCommands::LoadComm # @return [Hash] a hash representation of this {PrebindCksumCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#923 + # source://ruby-macho//lib/macho/load_commands.rb#1022 def to_h; end end # A load command used to indicate dynamic libraries used in prebinding. # Corresponds to LC_PREBOUND_DYLIB. # -# source://ruby-macho//lib/macho/load_commands.rb#587 +# source://ruby-macho//lib/macho/load_commands.rb#684 class MachO::LoadCommands::PreboundDylibCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] a bit vector of linked modules # @@ -2375,7 +2446,7 @@ class MachO::LoadCommands::PreboundDylibCommand < ::MachO::LoadCommands::LoadCom # @return [Hash] a hash representation of this {PreboundDylibCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#597 + # source://ruby-macho//lib/macho/load_commands.rb#696 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2386,7 +2457,7 @@ end # initialization routine and an index into the module table for the module # that defines the routine. Corresponds to LC_ROUTINES. # -# source://ruby-macho//lib/macho/load_commands.rb#616 +# source://ruby-macho//lib/macho/load_commands.rb#714 class MachO::LoadCommands::RoutinesCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the address of the initialization routine # @@ -2431,7 +2502,7 @@ class MachO::LoadCommands::RoutinesCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {RoutinesCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#642 + # source://ruby-macho//lib/macho/load_commands.rb#741 def to_h; end end @@ -2439,7 +2510,7 @@ end # initialization routine and an index into the module table for the module # that defines the routine. Corresponds to LC_ROUTINES_64. # -# source://ruby-macho//lib/macho/load_commands.rb#660 +# source://ruby-macho//lib/macho/load_commands.rb#758 class MachO::LoadCommands::RoutinesCommand64 < ::MachO::LoadCommands::RoutinesCommand # @return [Integer] the address of the initialization routine # @@ -2487,7 +2558,7 @@ end # be added to the current run path used to find @rpath prefixed dylibs. # Corresponds to LC_RPATH. # -# source://ruby-macho//lib/macho/load_commands.rb#934 +# source://ruby-macho//lib/macho/load_commands.rb#1032 class MachO::LoadCommands::RpathCommand < ::MachO::LoadCommands::LoadCommand # @return [LCStr] the path to add to the run path as an LCStr # @@ -2498,12 +2569,12 @@ class MachO::LoadCommands::RpathCommand < ::MachO::LoadCommands::LoadCommand # @param context [SerializationContext] the context # @return [String] the serialized fields of the load command # - # source://ruby-macho//lib/macho/load_commands.rb#940 + # source://ruby-macho//lib/macho/load_commands.rb#1039 def serialize(context); end # @return [Hash] a hash representation of this {RpathCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#950 + # source://ruby-macho//lib/macho/load_commands.rb#1049 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2514,20 +2585,20 @@ end # # @api private # -# source://ruby-macho//lib/macho/load_commands.rb#188 +# source://ruby-macho//lib/macho/load_commands.rb#190 MachO::LoadCommands::SEGMENT_FLAGS = T.let(T.unsafe(nil), Hash) # association of segment name symbols to names # # @api private # -# source://ruby-macho//lib/macho/load_commands.rb#160 +# source://ruby-macho//lib/macho/load_commands.rb#162 MachO::LoadCommands::SEGMENT_NAMES = T.let(T.unsafe(nil), Hash) # A load command indicating that part of this file is to be mapped into # the task's address space. Corresponds to LC_SEGMENT. # -# source://ruby-macho//lib/macho/load_commands.rb#400 +# source://ruby-macho//lib/macho/load_commands.rb#422 class MachO::LoadCommands::SegmentCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the file offset of the segment # @@ -2544,7 +2615,7 @@ class MachO::LoadCommands::SegmentCommand < ::MachO::LoadCommands::LoadCommand # @param flag [Symbol] a segment flag symbol # @return [Boolean] true if `flag` is present in the segment's flag field # - # source://ruby-macho//lib/macho/load_commands.rb#451 + # source://ruby-macho//lib/macho/load_commands.rb#474 def flag?(flag); end # @return [Integer] any flags associated with the segment @@ -2557,7 +2628,7 @@ class MachO::LoadCommands::SegmentCommand < ::MachO::LoadCommands::LoadCommand # @note See `guess_align` in `cctools/misc/lipo.c` # @return [Integer] the guessed alignment, as a power of 2 # - # source://ruby-macho//lib/macho/load_commands.rb#462 + # source://ruby-macho//lib/macho/load_commands.rb#485 def guess_align; end # @return [Integer] the initial VM protection @@ -2580,7 +2651,7 @@ class MachO::LoadCommands::SegmentCommand < ::MachO::LoadCommands::LoadCommand # @return [Array] if the Mach-O is 32-bit # @return [Array] if the Mach-O is 64-bit # - # source://ruby-macho//lib/macho/load_commands.rb#430 + # source://ruby-macho//lib/macho/load_commands.rb#453 def sections; end # @return [String] the name of the segment @@ -2590,7 +2661,7 @@ class MachO::LoadCommands::SegmentCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {SegmentCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#480 + # source://ruby-macho//lib/macho/load_commands.rb#503 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2610,7 +2681,7 @@ end # A load command indicating that part of this file is to be mapped into # the task's address space. Corresponds to LC_SEGMENT_64. # -# source://ruby-macho//lib/macho/load_commands.rb#499 +# source://ruby-macho//lib/macho/load_commands.rb#521 class MachO::LoadCommands::SegmentCommand64 < ::MachO::LoadCommands::SegmentCommand # @return [Integer] the file offset of the segment # @@ -2636,11 +2707,11 @@ end # A load command specifying the version of the sources used to build the # binary. Corresponds to LC_SOURCE_VERSION. # -# source://ruby-macho//lib/macho/load_commands.rb#1236 +# source://ruby-macho//lib/macho/load_commands.rb#1334 class MachO::LoadCommands::SourceVersionCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {SourceVersionCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1252 + # source://ruby-macho//lib/macho/load_commands.rb#1351 def to_h; end # @return [Integer] the version packed as a24.b10.c10.d10.e10 @@ -2652,14 +2723,14 @@ class MachO::LoadCommands::SourceVersionCommand < ::MachO::LoadCommands::LoadCom # # @return [String] a string representation of the version # - # source://ruby-macho//lib/macho/load_commands.rb#1241 + # source://ruby-macho//lib/macho/load_commands.rb#1340 def version_string; end end # A load command signifying a shared library that is a subframework of # an umbrella framework. Corresponds to LC_SUB_CLIENT. # -# source://ruby-macho//lib/macho/load_commands.rb#731 +# source://ruby-macho//lib/macho/load_commands.rb#829 class MachO::LoadCommands::SubClientCommand < ::MachO::LoadCommands::LoadCommand # @return [LCStr] the subclient name as an LCStr # @@ -2668,7 +2739,7 @@ class MachO::LoadCommands::SubClientCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {SubClientCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#735 + # source://ruby-macho//lib/macho/load_commands.rb#834 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2678,11 +2749,11 @@ end # A load command signifying membership of a subframework containing the name # of an umbrella framework. Corresponds to LC_SUB_FRAMEWORK. # -# source://ruby-macho//lib/macho/load_commands.rb#689 +# source://ruby-macho//lib/macho/load_commands.rb#787 class MachO::LoadCommands::SubFrameworkCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {SubFrameworkCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#693 + # source://ruby-macho//lib/macho/load_commands.rb#792 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2697,7 +2768,7 @@ end # A load command signifying a sublibrary of a shared library. Corresponds # to LC_SUB_LIBRARY. # -# source://ruby-macho//lib/macho/load_commands.rb#717 +# source://ruby-macho//lib/macho/load_commands.rb#815 class MachO::LoadCommands::SubLibraryCommand < ::MachO::LoadCommands::LoadCommand # @return [LCStr] the sublibrary name as an LCStr # @@ -2706,7 +2777,7 @@ class MachO::LoadCommands::SubLibraryCommand < ::MachO::LoadCommands::LoadComman # @return [Hash] a hash representation of this {SubLibraryCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#721 + # source://ruby-macho//lib/macho/load_commands.rb#820 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2716,7 +2787,7 @@ end # A load command signifying membership of a subumbrella containing the name # of an umbrella framework. Corresponds to LC_SUB_UMBRELLA. # -# source://ruby-macho//lib/macho/load_commands.rb#703 +# source://ruby-macho//lib/macho/load_commands.rb#801 class MachO::LoadCommands::SubUmbrellaCommand < ::MachO::LoadCommands::LoadCommand # @return [LCStr] the subumbrella framework name as an LCStr # @@ -2725,7 +2796,7 @@ class MachO::LoadCommands::SubUmbrellaCommand < ::MachO::LoadCommands::LoadComma # @return [Hash] a hash representation of this {SubUmbrellaCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#707 + # source://ruby-macho//lib/macho/load_commands.rb#806 def to_h; end # source://ruby-macho//lib/macho/structure.rb#278 @@ -2735,7 +2806,7 @@ end # An obsolete load command containing the offset and size of the (GNU style) # symbol table information. Corresponds to LC_SYMSEG. # -# source://ruby-macho//lib/macho/load_commands.rb#1263 +# source://ruby-macho//lib/macho/load_commands.rb#1361 class MachO::LoadCommands::SymsegCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the offset to the symbol segment # @@ -2749,14 +2820,14 @@ class MachO::LoadCommands::SymsegCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {SymsegCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1270 + # source://ruby-macho//lib/macho/load_commands.rb#1369 def to_h; end end # A load command containing the offsets and sizes of the link-edit 4.3BSD # "stab" style symbol table information. Corresponds to LC_SYMTAB. # -# source://ruby-macho//lib/macho/load_commands.rb#745 +# source://ruby-macho//lib/macho/load_commands.rb#843 class MachO::LoadCommands::SymtabCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the number of symbol table entries # @@ -2780,7 +2851,7 @@ class MachO::LoadCommands::SymtabCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] a hash representation of this {SymtabCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#758 + # source://ruby-macho//lib/macho/load_commands.rb#857 def to_h; end end @@ -2789,13 +2860,13 @@ end # # @note cctools-870 and onwards have all fields of thread_command commented # -# source://ruby-macho//lib/macho/load_commands.rb#609 +# source://ruby-macho//lib/macho/load_commands.rb#708 class MachO::LoadCommands::ThreadCommand < ::MachO::LoadCommands::LoadCommand; end # A load command containing the offset and number of hints in the two-level # namespace lookup hints table. Corresponds to LC_TWOLEVEL_HINTS. # -# source://ruby-macho//lib/macho/load_commands.rb#853 +# source://ruby-macho//lib/macho/load_commands.rb#951 class MachO::LoadCommands::TwolevelHintsCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the offset to the hint table # @@ -2814,14 +2885,14 @@ class MachO::LoadCommands::TwolevelHintsCommand < ::MachO::LoadCommands::LoadCom # @return [Hash] a hash representation of this {TwolevelHintsCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#864 + # source://ruby-macho//lib/macho/load_commands.rb#963 def to_h; end end # A representation of the two-level namespace lookup hints table exposed # by a {TwolevelHintsCommand} (`LC_TWOLEVEL_HINTS`). # -# source://ruby-macho//lib/macho/load_commands.rb#874 +# source://ruby-macho//lib/macho/load_commands.rb#973 class MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable # @api private # @param view [MachO::MachOView] the view into the current Mach-O @@ -2829,39 +2900,39 @@ class MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable # @param nhints [Integer] the number of two-level hints in the table # @return [TwolevelHintsTable] a new instance of TwolevelHintsTable # - # source://ruby-macho//lib/macho/load_commands.rb#882 + # source://ruby-macho//lib/macho/load_commands.rb#981 def initialize(view, htoffset, nhints); end # @return [Array] all hints in the table # - # source://ruby-macho//lib/macho/load_commands.rb#876 + # source://ruby-macho//lib/macho/load_commands.rb#975 def hints; end end # An individual two-level namespace lookup hint. # -# source://ruby-macho//lib/macho/load_commands.rb#891 +# source://ruby-macho//lib/macho/load_commands.rb#990 class MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable::TwolevelHint # @api private # @param blob [Integer] the 32-bit number containing the lookup hint # @return [TwolevelHint] a new instance of TwolevelHint # - # source://ruby-macho//lib/macho/load_commands.rb#900 + # source://ruby-macho//lib/macho/load_commands.rb#999 def initialize(blob); end # @return [Integer] the index into the sub-images # - # source://ruby-macho//lib/macho/load_commands.rb#893 + # source://ruby-macho//lib/macho/load_commands.rb#992 def isub_image; end # @return [Integer] the index into the table of contents # - # source://ruby-macho//lib/macho/load_commands.rb#896 + # source://ruby-macho//lib/macho/load_commands.rb#995 def itoc; end # @return [Hash] a hash representation of this {TwolevelHint} # - # source://ruby-macho//lib/macho/load_commands.rb#906 + # source://ruby-macho//lib/macho/load_commands.rb#1005 def to_h; end end @@ -2869,16 +2940,16 @@ end # identifying an object produced by static link editor. Corresponds to # LC_UUID. # -# source://ruby-macho//lib/macho/load_commands.rb#369 +# source://ruby-macho//lib/macho/load_commands.rb#391 class MachO::LoadCommands::UUIDCommand < ::MachO::LoadCommands::LoadCommand # @return [Hash] returns a hash representation of this {UUIDCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#389 + # source://ruby-macho//lib/macho/load_commands.rb#412 def to_h; end # @return [String] an alias for uuid_string # - # source://ruby-macho//lib/macho/load_commands.rb#384 + # source://ruby-macho//lib/macho/load_commands.rb#407 def to_s; end # @return [Array] the UUID @@ -2888,7 +2959,7 @@ class MachO::LoadCommands::UUIDCommand < ::MachO::LoadCommands::LoadCommand # @return [String] a string representation of the UUID # - # source://ruby-macho//lib/macho/load_commands.rb#373 + # source://ruby-macho//lib/macho/load_commands.rb#396 def uuid_string; end end @@ -2896,7 +2967,7 @@ end # was built to run. Corresponds to LC_VERSION_MIN_MACOSX and # LC_VERSION_MIN_IPHONEOS. # -# source://ruby-macho//lib/macho/load_commands.rb#1018 +# source://ruby-macho//lib/macho/load_commands.rb#1116 class MachO::LoadCommands::VersionMinCommand < ::MachO::LoadCommands::LoadCommand # @return [Integer] the SDK version X.Y.Z packed as x16.y8.z8 # @@ -2907,12 +2978,12 @@ class MachO::LoadCommands::VersionMinCommand < ::MachO::LoadCommands::LoadComman # # @return [String] a string representing the SDK version. # - # source://ruby-macho//lib/macho/load_commands.rb#1037 + # source://ruby-macho//lib/macho/load_commands.rb#1136 def sdk_string; end # @return [Hash] a hash representation of this {VersionMinCommand} # - # source://ruby-macho//lib/macho/load_commands.rb#1047 + # source://ruby-macho//lib/macho/load_commands.rb#1146 def to_h; end # @return [Integer] the version X.Y.Z packed as x16.y8.z8 @@ -2924,7 +2995,7 @@ class MachO::LoadCommands::VersionMinCommand < ::MachO::LoadCommands::LoadComman # # @return [String] a string representing the minimum OS version. # - # source://ruby-macho//lib/macho/load_commands.rb#1026 + # source://ruby-macho//lib/macho/load_commands.rb#1125 def version_string; end end @@ -3015,12 +3086,12 @@ class MachO::MachOFile # @return [Integer] the file's internal alignment # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def alignment(*args, **_arg1, &block); end # @return [Boolean] whether or not the file is of type `MH_BUNDLE` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def bundle?(*args, **_arg1, &block); end # Changes the shared library `old_name` to `new_name` @@ -3095,7 +3166,7 @@ class MachO::MachOFile # @return [Boolean] whether or not the file is of type `MH_CORE` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def core?(*args, **_arg1, &block); end # @return [Symbol] a symbol representation of the Mach-O's CPU subtype @@ -3147,12 +3218,12 @@ class MachO::MachOFile # @return [Boolean] whether or not the file is of type `MH_DSYM` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dsym?(*args, **_arg1, &block); end # @return [Boolean] whether or not the file is of type `MH_DYLIB` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dylib?(*args, **_arg1, &block); end # The Mach-O's dylib ID, or `nil` if not a dylib. @@ -3187,7 +3258,7 @@ class MachO::MachOFile # @return [Boolean] whether or not the file is of type `MH_DYLINKER` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dylinker?(*args, **_arg1, &block); end # @return [Symbol] the endianness of the file, :big or :little @@ -3197,7 +3268,7 @@ class MachO::MachOFile # @return [Boolean] whether or not the file is of type `MH_EXECUTE` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def executable?(*args, **_arg1, &block); end # @return [String, nil] the filename loaded from, or nil if loaded from a binary @@ -3219,12 +3290,12 @@ class MachO::MachOFile # @return [Integer] the header flags associated with the Mach-O # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def flags(*args, **_arg1, &block); end # @return [Boolean] whether or not the file is of type `MH_FVMLIB` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fvmlib?(*args, **_arg1, &block); end # @return [Headers::MachHeader] if the Mach-O is 32-bit @@ -3257,7 +3328,7 @@ class MachO::MachOFile # @return [Boolean] whether or not the file is of type `MH_KEXT_BUNDLE` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def kext?(*args, **_arg1, &block); end # All shared libraries linked to the Mach-O. @@ -3276,17 +3347,17 @@ class MachO::MachOFile # @return [Integer] the magic number # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def magic(*args, **_arg1, &block); end # @return [Boolean] true if the Mach-O has 32-bit magic, false otherwise # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def magic32?(*args, **_arg1, &block); end # @return [Boolean] true if the Mach-O has 64-bit magic, false otherwise # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def magic64?(*args, **_arg1, &block); end # @return [String] a string representation of the file's magic number @@ -3296,12 +3367,12 @@ class MachO::MachOFile # @return [Integer] the number of load commands in the Mach-O # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def ncmds(*args, **_arg1, &block); end # @return [Boolean] whether or not the file is of type `MH_OBJECT` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def object?(*args, **_arg1, &block); end # @return [Hash] any parser options that the instance was created with @@ -3321,7 +3392,7 @@ class MachO::MachOFile # @return [Boolean] whether or not the file is of type `MH_PRELOAD` # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def preload?(*args, **_arg1, &block); end # Replace a load command with another command in the Mach-O, preserving location. @@ -3369,7 +3440,7 @@ class MachO::MachOFile # @return [Integer] the size of all load commands, in bytes, in the Mach-O # - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def sizeofcmds(*args, **_arg1, &block); end # @return [Hash] a hash representation of this {MachOFile} @@ -3727,7 +3798,7 @@ end # Raised when a file's magic bytes are not valid Mach-O magic. # -# source://ruby-macho//lib/macho/exceptions.rb#46 +# source://ruby-macho//lib/macho/exceptions.rb#45 class MachO::MagicError < ::MachO::NotAMachOError # @param num [Integer] the unknown number # @return [MagicError] a new instance of MagicError @@ -3748,7 +3819,7 @@ class MachO::NotAMachOError < ::MachO::MachOError; end # Raised when a change at an offset is not valid. # -# source://ruby-macho//lib/macho/exceptions.rb#168 +# source://ruby-macho//lib/macho/exceptions.rb#167 class MachO::OffsetInsertionError < ::MachO::ModificationError # @param offset [Integer] the invalid offset # @return [OffsetInsertionError] a new instance of OffsetInsertionError @@ -3760,7 +3831,7 @@ end # Raised when a Mach-O file modification fails but can be recovered when # operating on multiple Mach-O slices of a fat binary in non-strict mode. # -# source://ruby-macho//lib/macho/exceptions.rb#22 +# source://ruby-macho//lib/macho/exceptions.rb#19 class MachO::RecoverableModificationError < ::MachO::ModificationError # @return [Integer, nil] The index of the Mach-O slice of a fat binary for # which modification failed or `nil` if not a fat binary. This is used to @@ -3784,7 +3855,7 @@ end # Raised when attempting to add an rpath that already exists. # -# source://ruby-macho//lib/macho/exceptions.rb#209 +# source://ruby-macho//lib/macho/exceptions.rb#208 class MachO::RpathExistsError < ::MachO::RecoverableModificationError # @param path [String] the extant path # @return [RpathExistsError] a new instance of RpathExistsError @@ -3795,7 +3866,7 @@ end # Raised when attempting to change an rpath that doesn't exist. # -# source://ruby-macho//lib/macho/exceptions.rb#201 +# source://ruby-macho//lib/macho/exceptions.rb#200 class MachO::RpathUnknownError < ::MachO::RecoverableModificationError # @param path [String] the unknown runtime path # @return [RpathUnknownError] a new instance of RpathUnknownError @@ -3866,7 +3937,7 @@ MachO::Sections::SECTION_TYPE_MASK = T.let(T.unsafe(nil), Integer) # Represents a section of a segment for 32-bit architectures. # -# source://ruby-macho//lib/macho/sections.rb#91 +# source://ruby-macho//lib/macho/sections.rb#90 class MachO::Sections::Section < ::MachO::MachOStructure # @return [Integer] the memory address of the section # @@ -3982,7 +4053,7 @@ end # Represents a section of a segment for 64-bit architectures. # -# source://ruby-macho//lib/macho/sections.rb#199 +# source://ruby-macho//lib/macho/sections.rb#198 class MachO::Sections::Section64 < ::MachO::Sections::Section # @return [Integer] the memory address of the section # @@ -4104,7 +4175,7 @@ end # Raised whenever unfinished code is called. # -# source://ruby-macho//lib/macho/exceptions.rb#217 +# source://ruby-macho//lib/macho/exceptions.rb#216 class MachO::UnimplementedError < ::MachO::MachOError # @param thing [String] the thing that is unimplemented # @return [UnimplementedError] a new instance of UnimplementedError diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.arm64_sequoia.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.arm64_sequoia.bottle.tar.gz new file mode 120000 index 0000000000000..3e989830ba206 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.arm64_sequoia.bottle.tar.gz @@ -0,0 +1 @@ +testball_bottle-0.1.yosemite.bottle.tar.gz \ No newline at end of file diff --git a/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sequoia.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sequoia.bottle.tar.gz new file mode 120000 index 0000000000000..3e989830ba206 --- /dev/null +++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sequoia.bottle.tar.gz @@ -0,0 +1 @@ +testball_bottle-0.1.yosemite.bottle.tar.gz \ No newline at end of file diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 7a104c887f235..24ccd2729d1bd 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -101,7 +101,7 @@ def self.extension_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec_rails-2.29.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-2.31.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-sorbet-0.8.3/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-macho-4.0.1/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-macho-4.1.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/ruby-prof-1.7.0") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-prof-1.7.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov-html-0.12.3/lib") diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/LICENSE b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/LICENSE similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/LICENSE rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/LICENSE diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho.rb index 12f701364be74..b9a90bb833360 100644 --- a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho.rb +++ b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho.rb @@ -16,7 +16,7 @@ # The primary namespace for ruby-macho. module MachO # release version - VERSION = "4.0.1" + VERSION = "4.1.0" # Opens the given filename as a MachOFile or FatFile, depending on its magic. # @param filename [String] the file being opened diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/exceptions.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/exceptions.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/exceptions.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/exceptions.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/fat_file.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/fat_file.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/fat_file.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/fat_file.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/headers.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/headers.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/headers.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/headers.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/load_commands.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/load_commands.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/load_commands.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/load_commands.rb index c420c8bd99246..1ed24a58beed4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/load_commands.rb +++ b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/load_commands.rb @@ -65,6 +65,7 @@ module LoadCommands (LC_REQ_DYLD | 0x33) => :LC_DYLD_EXPORTS_TRIE, (LC_REQ_DYLD | 0x34) => :LC_DYLD_CHAINED_FIXUPS, (LC_REQ_DYLD | 0x35) => :LC_FILESET_ENTRY, + 0x36 => :LC_ATOM_INFO, }.freeze # association of symbol representations to load command constants @@ -110,7 +111,7 @@ module LoadCommands # "reserved for internal use only", no public struct :LC_PREPAGE => "LoadCommand", :LC_DYSYMTAB => "DysymtabCommand", - :LC_LOAD_DYLIB => "DylibCommand", + :LC_LOAD_DYLIB => "DylibUseCommand", :LC_ID_DYLIB => "DylibCommand", :LC_LOAD_DYLINKER => "DylinkerCommand", :LC_ID_DYLINKER => "DylinkerCommand", @@ -122,7 +123,7 @@ module LoadCommands :LC_SUB_LIBRARY => "SubLibraryCommand", :LC_TWOLEVEL_HINTS => "TwolevelHintsCommand", :LC_PREBIND_CKSUM => "PrebindCksumCommand", - :LC_LOAD_WEAK_DYLIB => "DylibCommand", + :LC_LOAD_WEAK_DYLIB => "DylibUseCommand", :LC_SEGMENT_64 => "SegmentCommand64", :LC_ROUTINES_64 => "RoutinesCommand64", :LC_UUID => "UUIDCommand", @@ -153,6 +154,7 @@ module LoadCommands :LC_DYLD_EXPORTS_TRIE => "LinkeditDataCommand", :LC_DYLD_CHAINED_FIXUPS => "LinkeditDataCommand", :LC_FILESET_ENTRY => "FilesetEntryCommand", + :LC_ATOM_INFO => "LinkeditDataCommand", }.freeze # association of segment name symbols to names @@ -193,6 +195,20 @@ module LoadCommands :SG_READ_ONLY => 0x10, }.freeze + # association of dylib use flag symbols to values + # @api private + DYLIB_USE_FLAGS = { + :DYLIB_USE_WEAK_LINK => 0x1, + :DYLIB_USE_REEXPORT => 0x2, + :DYLIB_USE_UPWARD => 0x4, + :DYLIB_USE_DELAYED_INIT => 0x8, + }.freeze + + # the marker used to denote a newer style dylib use command. + # the value is the timestamp 24 January 1984 18:12:16 + # @api private + DYLIB_USE_MARKER = 0x1a741800 + # The top-level Mach-O load command structure. # # This is the most generic load command -- only the type ID and size are @@ -231,6 +247,13 @@ def self.create(cmd_sym, *args) # cmd will be filled in, view and cmdsize will be left unpopulated klass_arity = klass.min_args - 3 + # macOS 15 introduces a new dylib load command that adds a flags field to the end. + # It uses the same commands with it dynamically being created if the dylib has a flags field + if klass == DylibUseCommand && (args[1] != DYLIB_USE_MARKER || args.size <= DylibCommand.min_args - 3) + klass = DylibCommand + klass_arity = klass.min_args - 3 + end + raise LoadCommandCreationArityError.new(cmd_sym, klass_arity, args.size) if klass_arity > args.size klass.new(nil, cmd, nil, *args) @@ -526,6 +549,23 @@ class DylibCommand < LoadCommand # @return [Integer] the library's compatibility version number field :compatibility_version, :uint32 + # @example + # puts "this dylib is weakly loaded" if dylib_command.flag?(:DYLIB_USE_WEAK_LINK) + # @param flag [Symbol] a dylib use command flag symbol + # @return [Boolean] true if `flag` applies to this dylib command + def flag?(flag) + case cmd + when LOAD_COMMAND_CONSTANTS[:LC_LOAD_WEAK_DYLIB] + flag == :DYLIB_USE_WEAK_LINK + when LOAD_COMMAND_CONSTANTS[:LC_REEXPORT_DYLIB] + flag == :DYLIB_USE_REEXPORT + when LOAD_COMMAND_CONSTANTS[:LC_LOAD_UPWARD_DYLIB] + flag == :DYLIB_USE_UPWARD + else + false + end + end + # @param context [SerializationContext] # the context # @return [String] the serialized fields of the load command @@ -551,6 +591,65 @@ def to_h end end + # The newer format of load command representing some aspect of shared libraries, + # depending on filetype. Corresponds to LC_LOAD_DYLIB or LC_LOAD_WEAK_DYLIB. + class DylibUseCommand < DylibCommand + # @return [Integer] any flags associated with this dylib use command + field :flags, :uint32 + + alias marker timestamp + + # Instantiates a new DylibCommand or DylibUseCommand. + # macOS 15 and later use a new format for dylib commands (DylibUseCommand), + # which is determined based on a special timestamp and the name offset. + # @param view [MachO::MachOView] the load command's raw view + # @return [DylibCommand] the new dylib load command + # @api private + def self.new_from_bin(view) + dylib_command = DylibCommand.new_from_bin(view) + + if dylib_command.timestamp == DYLIB_USE_MARKER && + dylib_command.name.to_i == DylibUseCommand.bytesize + super(view) + else + dylib_command + end + end + + # @example + # puts "this dylib is weakly loaded" if dylib_command.flag?(:DYLIB_USE_WEAK_LINK) + # @param flag [Symbol] a dylib use command flag symbol + # @return [Boolean] true if `flag` applies to this dylib command + def flag?(flag) + flag = DYLIB_USE_FLAGS[flag] + + return false if flag.nil? + + flags & flag == flag + end + + # @param context [SerializationContext] + # the context + # @return [String] the serialized fields of the load command + # @api private + def serialize(context) + format = Utils.specialize_format(self.class.format, context.endianness) + string_payload, string_offsets = Utils.pack_strings(self.class.bytesize, + context.alignment, + :name => name.to_s) + cmdsize = self.class.bytesize + string_payload.bytesize + [cmd, cmdsize, string_offsets[:name], marker, current_version, + compatibility_version, flags].pack(format) + string_payload + end + + # @return [Hash] a hash representation of this {DylibUseCommand} + def to_h + { + "flags" => flags, + }.merge super + end + end + # A load command representing some aspect of the dynamic linker, depending # on filetype. Corresponds to LC_ID_DYLINKER, LC_LOAD_DYLINKER, and # LC_DYLD_ENVIRONMENT. @@ -958,7 +1057,7 @@ def to_h # the __LINKEDIT segment. Corresponds to LC_CODE_SIGNATURE, # LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE, # LC_DYLIB_CODE_SIGN_DRS, LC_LINKER_OPTIMIZATION_HINT, LC_DYLD_EXPORTS_TRIE, - # or LC_DYLD_CHAINED_FIXUPS. + # LC_DYLD_CHAINED_FIXUPS, or LC_ATOM_INFO. class LinkeditDataCommand < LoadCommand # @return [Integer] offset to the data in the __LINKEDIT segment field :dataoff, :uint32 diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/macho_file.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/macho_file.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/macho_file.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/macho_file.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/sections.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/sections.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/sections.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/sections.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/structure.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/structure.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/structure.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/structure.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/tools.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/tools.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/tools.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/tools.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/utils.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/utils.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/utils.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/utils.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/view.rb b/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/view.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.0.1/lib/macho/view.rb rename to Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/ruby-macho-4.1.0/lib/macho/view.rb