added static linking and funentry stuff