On Fri, 11 Jun 2021, vincent Dupaquis wrote: > I've got the feeling the GOT is not convinient and goes in opposite > direction than the one we try to achieve with having PIC, at least this is the > reason why I'm trying to avoid it. > > Any clue on the reason why it has been implemented that way ?
Without going into processor-specific details, which may imply additional requirements, you need to have a place to store final load-time addresses of preemptible symbols, and GOT serves exactly that place. The only case you could possibly be able to avoid, again barring any processor-specific requirements, the creation of a GOT with PIC code is a statically-linked position-independent executable (PIE). Late answer, but HTH. Maciej