adapt: get rid of bashism

We call so simple functions to adapt code addresses. There is no
need for bash specific shell code.