Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Arsylk/gosofix
/ functions
Functions
59 in github.com/Arsylk/gosofix
⨍
Functions
59
◇
Types & classes
25
↓ 19 callers
Method
writeAtOffset
writeUint64At writes a uint64 value at the specified offset
pkg/rebuilder.go:687
↓ 13 callers
Method
Read
()
pkg/reader.go:121
↓ 13 callers
Method
vaddrToOffset
(vaddr uint64)
pkg/rebuilder.go:163
↓ 12 callers
Method
Text
()
pkg/types.go:315
↓ 6 callers
Method
Type
()
pkg/types.go:510
↓ 6 callers
Method
readUint64At
readUint64At reads a uint64 from the source file at the given offset
pkg/reader.go:706
↓ 5 callers
Method
readStrtabString
readStrtabString reads a null-terminated string from the string table at the given name offset
pkg/reader.go:661
↓ 4 callers
Method
stBind
Helper functions for symbol info
pkg/types.go:498
↓ 3 callers
Function
AlignUp
AlignUp rounds up 'value' to the next multiple of 'align'
pkg/types.go:561
↓ 3 callers
Method
addSection
(name string, shType SHT_Type, flags uint64, addr uint64, size uint64, link uint32, info uint32, entsize uint6
pkg/rebuilder.go:119
↓ 3 callers
Method
stType
()
pkg/types.go:502
↓ 2 callers
Function
DemangleSymbol
DemangleSymbol attempts to demangle a C++ mangled symbol name. Returns the demangled name or the original if demangling fails.
pkg/types.go:575
↓ 2 callers
Method
Sym
()
pkg/types.go:514
↓ 2 callers
Method
addSectionName
(name string)
pkg/rebuilder.go:140
↓ 2 callers
Function
autoparseMemAddr
(addrStr string)
cmd/main.go:111
↓ 2 callers
Method
computeRelValue
computeRelValue computes the fixed value for a REL relocation
pkg/rebuilder.go:604
↓ 2 callers
Method
computeRelaValue
computeRelaValue computes the fixed value for a RELA relocation
pkg/rebuilder.go:641
↓ 2 callers
Function
fixElf
fixElf is the shared logic for both CLI and Library.
cmd/main.go:35
↓ 2 callers
Method
readSectionName
(nameOffset uint32)
pkg/rebuilder.go:154
↓ 1 callers
Function
FixELFHeaders
FixELFHeaders attempts to fix common issues with ELF headers. verbosity: 0=quiet (warn only), 1=info, 2=debug
pkg/sofixer.go:78
↓ 1 callers
Function
NewElfRebuilder
(reader *ElfReader, outputPath string)
pkg/rebuilder.go:20
↓ 1 callers
Method
ReadDyns
()
pkg/reader.go:219
↓ 1 callers
Method
ReadElfHeader
()
pkg/reader.go:148
↓ 1 callers
Method
ReadPhdrs
()
pkg/reader.go:179
↓ 1 callers
Method
ReadRelocs
()
pkg/reader.go:366
↓ 1 callers
Method
ResolveMetadata
ResolveMetadata resolves offsets for strings like soname, needed libs, and runpath
pkg/reader.go:584
↓ 1 callers
Method
WriteFixedElf
WriteFixedElf copies the source file and writes fixed relocation values
pkg/rebuilder.go:40
↓ 1 callers
Function
autogenerateOutputPath
(inputPath string)
cmd/main.go:103
↓ 1 callers
Method
calculateGotBounds
calculateGotBounds scans relocations to determine .got size and range
pkg/reader.go:616
↓ 1 callers
Method
calculateHashSizes
calculateHashSizes determines the exact size of .hash and .gnu.hash sections
pkg/reader.go:552
↓ 1 callers
Method
calculateSymbolCount
calculateSymbolCount determines the total number of symbols using hash tables
pkg/reader.go:469
↓ 1 callers
Method
calculateVerneedSize
calculateVerneedSize walks the verneed chain to compute total section size
pkg/reader.go:325
↓ 1 callers
Function
cliMain
()
cmd/main.go:55
↓ 1 callers
Method
copyInput
()
pkg/rebuilder.go:100
↓ 1 callers
Method
findSectionForAddr
findSectionForAddr finds the section index that contains the given address
pkg/rebuilder.go:448
↓ 1 callers
Method
fixSymbolSectionIndices
fixSymbolSectionIndices determines correct section indices for symbols
pkg/rebuilder.go:430
↓ 1 callers
Method
readRelocationTables
readRelocationTables reads all relocation tables (REL, RELA, JMPREL)
pkg/reader.go:403
↓ 1 callers
Method
readSymbols
readSymbols reads the symbol table
pkg/reader.go:375
↓ 1 callers
Method
writeDynamicSection
writeDynamicSection patches the existing dynamic section in the file
pkg/rebuilder.go:588
↓ 1 callers
Method
writeFixedInitsFinis
writeFixedInitsFinis writes addresses for init_array & finit_array
pkg/rebuilder.go:461
↓ 1 callers
Method
writeFixedRelocs
writeFixedRelocs writes REL, RELA & JMPREL(A)
pkg/rebuilder.go:524
↓ 1 callers
Method
writeSectionHeaders
()
pkg/rebuilder.go:177
↓ 1 callers
Method
writeSymbolTable
writeSymbolTable patches the existing symbol table in the file
pkg/rebuilder.go:572
Function
FixElf
FixElf is the exported function for the shared library. The returned C string must be freed by the caller. export FixElf
cmd/main.go:22
Method
IsEmptySymbol
()
pkg/types.go:148
Function
PageStart
(addr uint64)
pkg/types.go:568
Method
Sym
()
pkg/types.go:522
Method
Text
()
pkg/types.go:125
Method
Text
()
pkg/types.go:250
Method
Text
()
pkg/types.go:276
Method
Text
()
pkg/types.go:408
Method
Text
()
pkg/types.go:450
Method
Text
()
pkg/types.go:476
Method
Type
()
pkg/types.go:518
Function
init
()
pkg/sofixer.go:21
Function
main
()
cmd/main.go:118
Function
main
tests/test_dl.c:7
Function
readArray
readArray reads up to 'count' elements of type T from file at the given offset. Returns the successfully read elements and the actual count. On EOF, r
pkg/sofixer.go:127
Method
stInfo
()
pkg/types.go:506