[Bug c/93180] const function pointers placed in a custom section are causing that custom section to become writable

2020-01-07 Thread pskocik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93180 --- Comment #5 from pskocik at gmail dot com --- Jakub Jelinek, I later asked how this worked on Stack Overflow (https://stackoverflow.com/questions/59629946/why-do-gcc-and-clang-place-custom-sectioned-const-funcptr-symbols-into-writable). Got no

[Bug c/93180] const function pointers placed in a custom section are causing that custom section to become writable

2020-01-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93180 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4

[Bug c/93180] const function pointers placed in a custom section are causing that custom section to become writable

2020-01-06 Thread pskocik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93180 --- Comment #3 from pskocik at gmail dot com --- Thanks for explaining. Yes, -fPIC does cause the section to become writable on clang. I'm currently toying with using a custom section to gather const function-pointers, but this -fPIC stuff is cau

[Bug c/93180] const function pointers placed in a custom section are causing that custom section to become writable

2020-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93180 --- Comment #2 from Andrew Pinski --- 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__("mysect

[Bug c/93180] const function pointers placed in a custom section are causing that custom section to become writable

2020-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93180 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---