Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libc/gen



Module Name:    src
Committed By:   riastradh
Date:           Sat Mar 29 20:57:58 UTC 2025

Modified Files:
        src/lib/libc/gen: ctype_.c ctype_guard.h tolower_.c toupper_.c

Log Message:
libc: Restore ELF symbol sizes for _C_ctype_tab_ &c.

This is needed for dynamic position-dependent executables that refer
directly to _C_type_tab_ to get correct copy relocations to see the
table content.

Unfortunately, such executables won't get a guard page.

Fortunately, referring to _C_ctype_tab_ directly (and not the
indirection _ctype_tab_ as the ctype(3) macros do) is very weird and
unlikely to happen in the real world (none of the public interfaces
use it; it is exported for libc++.so/libstdc++.so to use, but those
aren't pies).  So missing the guard page in this case is probably not
so bad.

The symbol sizes are also needed for, e.g., gdb to nicely identify
addresses that lie in the table.

PR lib/58208: ctype(3) provides poor runtime feedback of abuse


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/gen/ctype_.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/ctype_guard.h
cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/tolower_.c \
    src/lib/libc/gen/toupper_.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index