brew vendor-gems: commit updates.
This commit is contained in:
parent
62cfe0ed4e
commit
c0a54010b6
@ -165,6 +165,8 @@ GEM
|
|||||||
yard (>= 0.9)
|
yard (>= 0.9)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
aarch64-linux
|
||||||
|
arm-linux
|
||||||
arm64-darwin
|
arm64-darwin
|
||||||
x86_64-darwin
|
x86_64-darwin
|
||||||
x86_64-linux
|
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/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/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/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/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}/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")
|
$:.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/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/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/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/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}/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")
|
$:.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 ||= {}
|
@tag_at_map ||= {}
|
||||||
return @tag_at_map[n] if @tag_at_map[n]
|
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
|
dyn.elf_class = header.elf_class
|
||||||
stream.pos = tag_start + n * dyn.num_bytes
|
stream.pos = tag_start + n * dyn.num_bytes
|
||||||
dyn.offset = stream.pos
|
dyn.offset = stream.pos
|
||||||
@ -36,7 +36,7 @@ module ELFTools
|
|||||||
return @header if defined?(@header)
|
return @header if defined?(@header)
|
||||||
|
|
||||||
stream.pos = 0
|
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.elf_class = elf_class
|
||||||
@header.read(stream)
|
@header.read(stream)
|
||||||
end
|
end
|
||||||
@ -237,7 +237,7 @@ module ELFTools
|
|||||||
# #=> #<ELFTools::Segments::NoteSegment:0x005629dda1e4f8>
|
# #=> #<ELFTools::Segments::NoteSegment:0x005629dda1e4f8>
|
||||||
#
|
#
|
||||||
# # this is ok
|
# # 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>
|
# #=> #<ELFTools::Segments::NoteSegment:0x005629dda1e4f8>
|
||||||
# @example
|
# @example
|
||||||
# elf.segment_by_type(1337)
|
# elf.segment_by_type(1337)
|
||||||
@ -358,7 +358,7 @@ module ELFTools
|
|||||||
|
|
||||||
def create_section(n)
|
def create_section(n)
|
||||||
stream.pos = header.e_shoff + n * header.e_shentsize
|
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.elf_class = elf_class
|
||||||
shdr.read(stream)
|
shdr.read(stream)
|
||||||
Sections::Section.create(shdr, stream,
|
Sections::Section.create(shdr, stream,
|
||||||
@ -369,7 +369,7 @@ module ELFTools
|
|||||||
|
|
||||||
def create_segment(n)
|
def create_segment(n)
|
||||||
stream.pos = header.e_phoff + n * header.e_phentsize
|
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
|
phdr.elf_class = elf_class
|
||||||
Segments::Segment.create(phdr.read(stream), stream, offset_from_vma: method(:offset_from_vma))
|
Segments::Segment.create(phdr.read(stream), stream, offset_from_vma: method(:offset_from_vma))
|
||||||
end
|
end
|
||||||
@ -79,7 +79,7 @@ module ELFTools
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_note(cur)
|
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)
|
ELFTools::Note::Note.new(nhdr, stream, cur)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ module ELFTools
|
|||||||
@offset_from_vma = offset_from_vma
|
@offset_from_vma = offset_from_vma
|
||||||
end
|
end
|
||||||
|
|
||||||
# Return +header.sh_type+ in a simplier way.
|
# Return +header.sh_type+ in a simpler way.
|
||||||
# @return [Integer]
|
# @return [Integer]
|
||||||
# The type, meaning of types are defined in {Constants::SHT}.
|
# The type, meaning of types are defined in {Constants::SHT}.
|
||||||
def type
|
def type
|
||||||
@ -20,7 +20,7 @@ module ELFTools
|
|||||||
@offset_from_vma = offset_from_vma
|
@offset_from_vma = offset_from_vma
|
||||||
end
|
end
|
||||||
|
|
||||||
# Return +header.p_type+ in a simplier way.
|
# Return +header.p_type+ in a simpler way.
|
||||||
# @return [Integer]
|
# @return [Integer]
|
||||||
# The type, meaning of types are defined in {Constants::PT}.
|
# The type, meaning of types are defined in {Constants::PT}.
|
||||||
def type
|
def type
|
||||||
@ -35,19 +35,19 @@ module ELFTools
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Is this segment readable?
|
# Is this segment readable?
|
||||||
# @return [Boolean] Ture or false.
|
# @return [Boolean] True or false.
|
||||||
def readable?
|
def readable?
|
||||||
(header.p_flags & 4) == 4
|
(header.p_flags & 4) == 4
|
||||||
end
|
end
|
||||||
|
|
||||||
# Is this segment writable?
|
# Is this segment writable?
|
||||||
# @return [Boolean] Ture or false.
|
# @return [Boolean] True or false.
|
||||||
def writable?
|
def writable?
|
||||||
(header.p_flags & 2) == 2
|
(header.p_flags & 2) == 2
|
||||||
end
|
end
|
||||||
|
|
||||||
# Is this segment executable?
|
# Is this segment executable?
|
||||||
# @return [Boolean] Ture or false.
|
# @return [Boolean] True or false.
|
||||||
def executable?
|
def executable?
|
||||||
(header.p_flags & 1) == 1
|
(header.p_flags & 1) == 1
|
||||||
end
|
end
|
||||||
@ -5,7 +5,7 @@ module ELFTools
|
|||||||
module Util
|
module Util
|
||||||
# Class methods.
|
# Class methods.
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
# Round up the number to be mulitple of
|
# Round up the number to be multiple of
|
||||||
# +2**bit+.
|
# +2**bit+.
|
||||||
# @param [Integer] num Number to be rounded-up.
|
# @param [Integer] num Number to be rounded-up.
|
||||||
# @param [Integer] bit How many bit to be aligned.
|
# @param [Integer] bit How many bit to be aligned.
|
||||||
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
module ELFTools
|
module ELFTools
|
||||||
# Current gem version
|
# Current gem version
|
||||||
VERSION = '1.2.0'
|
VERSION = '1.3.0'
|
||||||
end
|
end
|
||||||
@ -177,7 +177,7 @@ module PatchELF
|
|||||||
end
|
end
|
||||||
|
|
||||||
def modify_needed
|
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
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ module PatchELF
|
|||||||
new_rpath_strtab_idx = shdr_dynstr.sh_size.to_i
|
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"
|
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
|
dyn[:header].d_val = new_rpath_strtab_idx
|
||||||
with_buf_at(dyn[:offset]) { |b| dyn[:header].write(b) }
|
with_buf_at(dyn[:offset]) { |b| dyn[:header].write(b) }
|
||||||
end
|
end
|
||||||
@ -273,7 +273,7 @@ module PatchELF
|
|||||||
def modify_soname
|
def modify_soname
|
||||||
return unless ehdr.e_type == ELFTools::Constants::ET_DYN
|
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
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ module PatchELF
|
|||||||
# consider DT_NULL when copying
|
# consider DT_NULL when copying
|
||||||
replacement_size = (dt_null_idx + 1) * dyn_num_bytes
|
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]
|
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
|
dyn_rpath = ELFTools::Structs::ELF_Dyn.new endian: endian, elf_class: elf_class
|
||||||
@ -966,7 +966,7 @@ module PatchELF
|
|||||||
def overwrite_replaced_sections
|
def overwrite_replaced_sections
|
||||||
# the original source says this has to be done separately to
|
# the original source says this has to be done separately to
|
||||||
# prevent clobbering the previously written section contents.
|
# 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
|
shdr = find_section(rsec_name)&.header
|
||||||
next unless shdr
|
next unless shdr
|
||||||
|
|
||||||
@ -976,7 +976,7 @@ module PatchELF
|
|||||||
end
|
end
|
||||||
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
|
return if shdr.sh_type == ELFTools::Constants::SHT_NOTE && shdr.sh_addralign <= @section_alignment
|
||||||
|
|
||||||
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_addr = start_addr + (cur_off - start_offset)
|
||||||
shdr.sh_size = rsec_data.size
|
shdr.sh_size = rsec_data.size
|
||||||
|
|
||||||
write_section_aligment(shdr)
|
write_section_alignment(shdr)
|
||||||
|
|
||||||
seg_type = {
|
seg_type = {
|
||||||
'.interp' => ELFTools::Constants::PT_INTERP,
|
'.interp' => ELFTools::Constants::PT_INTERP,
|
||||||
@ -63,11 +63,11 @@ module PatchELF
|
|||||||
|
|
||||||
def patch_requests
|
def patch_requests
|
||||||
@options[:set].each do |sym, val|
|
@options[:set].each do |sym, val|
|
||||||
patcher.__send__("#{sym}=".to_sym, val)
|
patcher.__send__(:"#{sym}=", val)
|
||||||
end
|
end
|
||||||
|
|
||||||
@options[:needed].each do |type, val|
|
@options[:needed].each do |type, val|
|
||||||
patcher.__send__("#{type}_needed".to_sym, *val)
|
patcher.__send__(:"#{type}_needed", *val)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
module PatchELF
|
module PatchELF
|
||||||
# Current gem version.
|
# Current gem version.
|
||||||
VERSION = '1.4.0'.freeze
|
VERSION = '1.5.0'.freeze
|
||||||
end
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user