Skip to content

Commit 7fb5729

Browse files
committed
abstract relocation types
1 parent b18bbbf commit 7fb5729

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ObjFileBase.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ readmeta{T<:ObjectHandle}(io::IO, ::Type{T}) =
9393

9494
abstract SectionRef{T<:ObjectHandle}
9595
abstract Section{T<:ObjectHandle}
96+
abstract Relocation{T<:ObjectHandle}
97+
abstract RelocationRef{T<:ObjectHandle}
9698

9799
# The size of the actual data contained in the section. This should exclude any
98100
# padding mandated by the file format e.g. due to alignment rules
@@ -109,6 +111,7 @@ abstract Section{T<:ObjectHandle}
109111

110112
# Retrieving the actual section datastructure
111113
@mustimplement deref(section::SectionRef)
114+
deref(section::Section) = section
112115

113116
# Retrieving the object handle
114117
@mustimplement handle(section::SectionRef)
@@ -280,6 +283,8 @@ end
280283

281284
readmeta(file::String) = readmeta(open(file,"r"))
282285

286+
read{T<:ObjectHandle}(oh::T, args...) = read(oh.io,args...)
287+
283288
# Others
284289

285290
function getSectionLoadAddress

0 commit comments

Comments
 (0)