3

I'm trying to figure out the difference between these two sections, this may appear to be a duplicate of this question, but the answer given there didn't explain a lot, so I'd like a more detailed and concise explanation.

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Trey
  • 474
  • 2
  • 9
  • 32

1 Answers1

7

The split is due to security reasons. By default (used to be only under -Wl,-z,relro in the past) .got section is remapped as read-only once dynamic loader resolved all data relocations at startup (i.e. before entering main function) to prevent some types of exploits. .got.plt can not be remapped because of lazy symbol binding (unless LD_BIND_NOW or -Wl,-z,now were used in which case lazy binding is turned off and .got.plt is remapped as well).

yugr
  • 19,769
  • 3
  • 51
  • 96