https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93180
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- as I mentioned function pointer has nothing to do with it, you can see the behavior with: __attribute((__section__("mysection"))) int const cx = -42; typedef const int *iptr; __attribute((__section__("mysection"))) const iptr cxptr= & cx; ---- CUT ---- With -fPIE/-fPIC (which means the relocation needs to be done at runtime and such), get: .section mysection,"aw",@progbits With -fno-PIE/-fno-PIC: .section mysection,"a",@progbits