Module Name: src Committed By: riastradh Date: Sun Mar 30 16:17:05 UTC 2025
Modified Files: src/lib/libc: Makefile src/lib/libc/gen: ctype_guard.h Log Message: ctype(3): Actually conditionalize guard page on shared libc. Apparently we build the libc .o files with -fPIC too (I guess this is so that libc.a works in position-independent executables? but why don't they just use libc_pic.a?), so use a purpose-built cpp macro _CTYPE_DYNAMIC for this instead of using __PIC__. Now this shows the right symbol sizes: $ readelf -s ctype_.pico | grep _C_ctype_tab_guarded_ 3: 0000000000000000 4610 OBJECT LOCAL DEFAULT 11 _C_ctype_tab_guarded_ $ readelf -s ctype_.po | grep _C_ctype_tab_guarded_ 3: 0000000000000000 514 OBJECT LOCAL DEFAULT 7 _C_ctype_tab_guarded_ $ readelf -s ctype_.o | grep _C_ctype_tab_guarded_ 3: 0000000000000000 514 OBJECT LOCAL DEFAULT 7 _C_ctype_tab_guarded_ PR lib/58208: ctype(3) provides poor runtime feedback of abuse To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/lib/libc/Makefile cvs rdiff -u -r1.4 -r1.5 src/lib/libc/gen/ctype_guard.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.