diff --git a/elf.cabal b/elf.cabal
--- a/elf.cabal
+++ b/elf.cabal
@@ -1,25 +1,24 @@
-Name:          elf
-Version:       0.27
-License:       BSD3
-License-file:  LICENSE
-Category:      Data
-Author:        Erik Charlebois
-Copyright:     Erik Charlebois
-Maintainer:    Erik Charlebois <erikcharlebois@gmail.com>
-Stability:     stable
-Cabal-Version: >= 1.6
-Homepage:      http://github.com/erikcharlebois/elf
-Build-Depends: base
-Build-Type:    Custom
-Synopsis:      Parser for ELF object format.
-Description:   Parser for ELF object format.
-Data-Files:    tests/empty.elf tests/Test.hs
-
-source-repository head
-  type:     git
-  location: http://github.com/erikcharlebois/elf
-
-library
-    build-depends:   base >= 2 && < 5, bytestring, binary
-    hs-source-dirs:  src
-    exposed-modules: Data.Elf
+Name:          elf
+Version:       0.28
+License:       BSD3
+License-file:  LICENSE
+Category:      Data
+Author:        Erik Charlebois
+Copyright:     Erik Charlebois
+Maintainer:    Baojun Wang <wangbj@gmail.com>
+Stability:     stable
+Cabal-Version: >= 1.6
+Homepage:      https://github.com/wangbj/elf
+Build-Type:    Custom
+Synopsis:      Parser for ELF object format.
+Description:   Parser for ELF object format.
+Data-Files:    tests/empty.elf tests/Test.hs
+
+source-repository head
+  type:     git
+  location: https://github.com/wangbj/elf.git
+
+library
+    build-depends:   base >= 2 && < 5, bytestring, binary
+    hs-source-dirs:  src
+    exposed-modules: Data.Elf
diff --git a/src/Data/Elf.hs b/src/Data/Elf.hs
--- a/src/Data/Elf.hs
+++ b/src/Data/Elf.hs
@@ -666,12 +666,12 @@
 -- If the size is zero, or the offset larger than the 'elfSectionData',
 -- then 'Nothing' is returned.
 findSymbolDefinition :: ElfSymbolTableEntry -> Maybe B.ByteString
-findSymbolDefinition e =
-    let enclosingData = fmap elfSectionData (steEnclosingSection e)
-        start = fromIntegral (steValue e)
+findSymbolDefinition e = steEnclosingSection e >>= \enclosingSection ->
+    let enclosingData = elfSectionData enclosingSection
+        start = ( (fromIntegral (steValue e)) - (fromIntegral (elfSectionAddr enclosingSection) ) )
         len = fromIntegral (steSize e)
-        def = fmap (B.take len . B.drop start) enclosingData
-    in if def == Just B.empty then Nothing else def
+        def = (B.take len . B.drop start) enclosingData
+    in if B.null def then Nothing else Just def
 
 runGetMany :: Get a -> L.ByteString -> [a]
 runGetMany g bs
@@ -712,7 +712,7 @@
     return $ EST (nameIdx,name) sec typ bind other sTlbIdx symVal size
 
 sectionByIndex :: Elf -> ElfSectionIndex -> Maybe ElfSection
-sectionByIndex e (SHNIndex i) = lookup i . zip [1..] $ (elfSections e)
+sectionByIndex e (SHNIndex i) = lookup i . zip [0..] $ (elfSections e)
 sectionByIndex _ _ = Nothing
 
 infoToTypeAndBind :: Word8 -> (ElfSymbolType,ElfSymbolBinding)
