brew vendor-gems: commit updates.
This commit is contained in:
parent
62cfe0ed4e
commit
c0a54010b6
@ -165,6 +165,8 @@ GEM
|
||||
yard (>= 0.9)
|
||||
|
||||
PLATFORMS
|
||||
aarch64-linux
|
||||
arm-linux
|
||||
arm64-darwin
|
||||
x86_64-darwin
|
||||
x86_64-linux
|
||||
|
||||
@ -42,7 +42,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/commander-4.6.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.5.1/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/docile-1.4.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.2.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.3.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/erubi-1.12.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/hana-1.3.7/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/hpricot-0.8.6")
|
||||
@ -68,7 +68,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rainbow-3.1.1/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.11261/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parlour-8.1.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.4.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.5.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.1/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prettier_print-1.2.1/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/prism-0.24.0")
|
||||
|
||||
@ -96,7 +96,7 @@ module ELFTools
|
||||
@tag_at_map ||= {}
|
||||
return @tag_at_map[n] if @tag_at_map[n]
|
||||
|
||||
dyn = Structs::ELF_Dyn.new(endian: endian)
|
||||
dyn = Structs::ELF_Dyn.new(endian:)
|
||||
dyn.elf_class = header.elf_class
|
||||
stream.pos = tag_start + n * dyn.num_bytes
|
||||
dyn.offset = stream.pos
|
||||
@ -36,7 +36,7 @@ module ELFTools
|
||||
return @header if defined?(@header)
|
||||
|
||||
stream.pos = 0
|
||||
@header = Structs::ELF_Ehdr.new(endian: endian, offset: stream.pos)
|
||||
@header = Structs::ELF_Ehdr.new(endian:, offset: stream.pos)
|
||||
@header.elf_class = elf_class
|
||||
@header.read(stream)
|
||||
end
|
||||
@ -237,7 +237,7 @@ module ELFTools
|
||||
# #=> #<ELFTools::Segments::NoteSegment:0x005629dda1e4f8>
|
||||
#
|
||||
# # this is ok
|
||||
# elf.segment_by_type('note') # will be tranformed into `PT_NOTE`
|
||||
# elf.segment_by_type('note') # will be transformed into `PT_NOTE`
|
||||
# #=> #<ELFTools::Segments::NoteSegment:0x005629dda1e4f8>
|
||||
# @example
|
||||
# elf.segment_by_type(1337)
|
||||
@ -358,7 +358,7 @@ module ELFTools
|
||||
|
||||
def create_section(n)
|
||||
stream.pos = header.e_shoff + n * header.e_shentsize
|
||||
shdr = Structs::ELF_Shdr.new(endian: endian, offset: stream.pos)
|
||||
shdr = Structs::ELF_Shdr.new(endian:, offset: stream.pos)
|
||||
shdr.elf_class = elf_class
|
||||
shdr.read(stream)
|
||||
Sections::Section.create(shdr, stream,
|
||||
@ -369,7 +369,7 @@ module ELFTools
|
||||
|
||||
def create_segment(n)
|
||||
stream.pos = header.e_phoff + n * header.e_phentsize
|
||||
phdr = Structs::ELF_Phdr[elf_class].new(endian: endian, offset: stream.pos)
|
||||
phdr = Structs::ELF_Phdr[elf_class].new(endian:, offset: stream.pos)
|
||||
phdr.elf_class = elf_class
|
||||
Segments::Segment.create(phdr.read(stream), stream, offset_from_vma: method(:offset_from_vma))
|
||||
end
|
||||
@ -79,7 +79,7 @@ module ELFTools
|
||||
end
|
||||
|
||||
def create_note(cur)
|
||||
nhdr = Structs::ELF_Nhdr.new(endian: endian, offset: stream.pos).read(stream)
|
||||
nhdr = Structs::ELF_Nhdr.new(endian:, offset: stream.pos).read(stream)
|
||||
ELFTools::Note::Note.new(nhdr, stream, cur)
|
||||
end
|
||||
|
||||
@ -26,7 +26,7 @@ module ELFTools
|
||||
@offset_from_vma = offset_from_vma
|
||||
end
|
||||
|
||||
# Return +header.sh_type+ in a simplier way.
|
||||
# Return +header.sh_type+ in a simpler way.
|
||||
# @return [Integer]
|
||||
# The type, meaning of types are defined in {Constants::SHT}.
|
||||
def type
|
||||
@ -20,7 +20,7 @@ module ELFTools
|
||||
@offset_from_vma = offset_from_vma
|
||||
end
|
||||
|
||||
# Return +header.p_type+ in a simplier way.
|
||||
# Return +header.p_type+ in a simpler way.
|
||||
# @return [Integer]
|
||||
# The type, meaning of types are defined in {Constants::PT}.
|
||||
def type
|
||||
@ -35,19 +35,19 @@ module ELFTools
|
||||
end
|
||||
|
||||
# Is this segment readable?
|
||||
# @return [Boolean] Ture or false.
|
||||
# @return [Boolean] True or false.
|
||||
def readable?
|
||||
(header.p_flags & 4) == 4
|
||||
end
|
||||
|
||||
# Is this segment writable?
|
||||
# @return [Boolean] Ture or false.
|
||||
# @return [Boolean] True or false.
|
||||
def writable?
|
||||
(header.p_flags & 2) == 2
|
||||
end
|
||||
|
||||
# Is this segment executable?
|
||||
# @return [Boolean] Ture or false.
|
||||
# @return [Boolean] True or false.
|
||||
def executable?
|
||||
(header.p_flags & 1) == 1
|
||||
end
|
||||
@ -5,7 +5,7 @@ module ELFTools
|
||||
module Util
|
||||
# Class methods.
|
||||
module ClassMethods
|
||||
# Round up the number to be mulitple of
|
||||
# Round up the number to be multiple of
|
||||
# +2**bit+.
|
||||
# @param [Integer] num Number to be rounded-up.
|
||||
# @param [Integer] bit How many bit to be aligned.
|
||||
@ -2,5 +2,5 @@
|
||||
|
||||
module ELFTools
|
||||
# Current gem version
|
||||
VERSION = '1.2.0'
|
||||
VERSION = '1.3.0'
|
||||
end
|
||||
@ -177,7 +177,7 @@ module PatchELF
|
||||
end
|
||||
|
||||
def modify_needed
|
||||
# due to gsoc time constraints only implmenting features used by brew.
|
||||
# due to gsoc time constraints only implementing features used by brew.
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
@ -257,7 +257,7 @@ module PatchELF
|
||||
new_rpath_strtab_idx = shdr_dynstr.sh_size.to_i
|
||||
new_dynstr[new_rpath_strtab_idx..(new_rpath_strtab_idx + new_rpath.size)] = "#{new_rpath}\x00"
|
||||
|
||||
dyn_tags.each do |_, dyn|
|
||||
dyn_tags.each_value do |dyn|
|
||||
dyn[:header].d_val = new_rpath_strtab_idx
|
||||
with_buf_at(dyn[:offset]) { |b| dyn[:header].write(b) }
|
||||
end
|
||||
@ -273,7 +273,7 @@ module PatchELF
|
||||
def modify_soname
|
||||
return unless ehdr.e_type == ELFTools::Constants::ET_DYN
|
||||
|
||||
# due to gsoc time constraints only implmenting features used by brew.
|
||||
# due to gsoc time constraints only implementing features used by brew.
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
@ -306,7 +306,7 @@ module PatchELF
|
||||
# consider DT_NULL when copying
|
||||
replacement_size = (dt_null_idx + 1) * dyn_num_bytes
|
||||
|
||||
# make space for dt_runpath tag at the top, shift data by one tag positon
|
||||
# make space for dt_runpath tag at the top, shift data by one tag position
|
||||
new_dynamic_data[dyn_num_bytes..(replacement_size + dyn_num_bytes)] = new_dynamic_data[0..replacement_size]
|
||||
|
||||
dyn_rpath = ELFTools::Structs::ELF_Dyn.new endian: endian, elf_class: elf_class
|
||||
@ -966,7 +966,7 @@ module PatchELF
|
||||
def overwrite_replaced_sections
|
||||
# the original source says this has to be done separately to
|
||||
# prevent clobbering the previously written section contents.
|
||||
@replaced_sections.each do |rsec_name, _|
|
||||
@replaced_sections.each_key do |rsec_name|
|
||||
shdr = find_section(rsec_name)&.header
|
||||
next unless shdr
|
||||
|
||||
@ -976,7 +976,7 @@ module PatchELF
|
||||
end
|
||||
end
|
||||
|
||||
def write_section_aligment(shdr)
|
||||
def write_section_alignment(shdr)
|
||||
return if shdr.sh_type == ELFTools::Constants::SHT_NOTE && shdr.sh_addralign <= @section_alignment
|
||||
|
||||
shdr.sh_addralign = @section_alignment
|
||||
@ -1012,7 +1012,7 @@ module PatchELF
|
||||
shdr.sh_addr = start_addr + (cur_off - start_offset)
|
||||
shdr.sh_size = rsec_data.size
|
||||
|
||||
write_section_aligment(shdr)
|
||||
write_section_alignment(shdr)
|
||||
|
||||
seg_type = {
|
||||
'.interp' => ELFTools::Constants::PT_INTERP,
|
||||
@ -63,11 +63,11 @@ module PatchELF
|
||||
|
||||
def patch_requests
|
||||
@options[:set].each do |sym, val|
|
||||
patcher.__send__("#{sym}=".to_sym, val)
|
||||
patcher.__send__(:"#{sym}=", val)
|
||||
end
|
||||
|
||||
@options[:needed].each do |type, val|
|
||||
patcher.__send__("#{type}_needed".to_sym, *val)
|
||||
patcher.__send__(:"#{type}_needed", *val)
|
||||
end
|
||||
end
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
|
||||
module PatchELF
|
||||
# Current gem version.
|
||||
VERSION = '1.4.0'.freeze
|
||||
VERSION = '1.5.0'.freeze
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user