mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 00:52:26 -05:00 
			
		
		
		
	[chore]: Bump github.com/KimMachineGun/automemlimit from 0.2.4 to 0.2.5 (#1666)
Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.2.4 to 0.2.5. - [Release notes](https://github.com/KimMachineGun/automemlimit/releases) - [Commits](https://github.com/KimMachineGun/automemlimit/compare/v0.2.4...v0.2.5) --- updated-dependencies: - dependency-name: github.com/KimMachineGun/automemlimit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								3f9b2336c0
							
						
					
				
			
			
				commit
				
					
						57dc742c76
					
				
			
		
					 200 changed files with 16392 additions and 38190 deletions
				
			
		
							
								
								
									
										50
									
								
								vendor/github.com/cilium/ebpf/internal/elf.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										50
									
								
								vendor/github.com/cilium/ebpf/internal/elf.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -35,6 +35,29 @@ func NewSafeELFFile(r io.ReaderAt) (safe *SafeELFFile, err error) { | |||
| 	return &SafeELFFile{file}, nil | ||||
| } | ||||
| 
 | ||||
| // OpenSafeELFFile reads an ELF from a file. | ||||
| // | ||||
| // It works like NewSafeELFFile, with the exception that safe.Close will | ||||
| // close the underlying file. | ||||
| func OpenSafeELFFile(path string) (safe *SafeELFFile, err error) { | ||||
| 	defer func() { | ||||
| 		r := recover() | ||||
| 		if r == nil { | ||||
| 			return | ||||
| 		} | ||||
| 
 | ||||
| 		safe = nil | ||||
| 		err = fmt.Errorf("reading ELF file panicked: %s", r) | ||||
| 	}() | ||||
| 
 | ||||
| 	file, err := elf.Open(path) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	return &SafeELFFile{file}, nil | ||||
| } | ||||
| 
 | ||||
| // Symbols is the safe version of elf.File.Symbols. | ||||
| func (se *SafeELFFile) Symbols() (syms []elf.Symbol, err error) { | ||||
| 	defer func() { | ||||
|  | @ -50,3 +73,30 @@ func (se *SafeELFFile) Symbols() (syms []elf.Symbol, err error) { | |||
| 	syms, err = se.File.Symbols() | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DynamicSymbols is the safe version of elf.File.DynamicSymbols. | ||||
| func (se *SafeELFFile) DynamicSymbols() (syms []elf.Symbol, err error) { | ||||
| 	defer func() { | ||||
| 		r := recover() | ||||
| 		if r == nil { | ||||
| 			return | ||||
| 		} | ||||
| 
 | ||||
| 		syms = nil | ||||
| 		err = fmt.Errorf("reading ELF dynamic symbols panicked: %s", r) | ||||
| 	}() | ||||
| 
 | ||||
| 	syms, err = se.File.DynamicSymbols() | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // SectionsByType returns all sections in the file with the specified section type. | ||||
| func (se *SafeELFFile) SectionsByType(typ elf.SectionType) []*elf.Section { | ||||
| 	sections := make([]*elf.Section, 0, 1) | ||||
| 	for _, section := range se.Sections { | ||||
| 		if section.Type == typ { | ||||
| 			sections = append(sections, section) | ||||
| 		} | ||||
| 	} | ||||
| 	return sections | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue