[PATCH] libio: Fix oversized __io_vtables
Adam Jackson
ajax@redhat.com
Thu Sep 7 19:38:28 GMT 2023
IO_VTABLES_LEN is the expected size of the struct in bytes, not the
number of __IO_jump_t's in the array. Drops just under 384kb from
.rodata on LP64 machines.
Fixes: 3020f72618e ("libio: Remove the usage of __libc_IO_vtables")
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
libio/vtables.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libio/vtables.c b/libio/vtables.c
index 1d8ad612e94..7cb894d751d 100644
--- a/libio/vtables.c
+++ b/libio/vtables.c
@@ -86,11 +86,11 @@
# pragma weak __wprintf_buffer_as_file_overflow
# pragma weak __wprintf_buffer_as_file_xsputn
#endif
-const struct _IO_jump_t __io_vtables[IO_VTABLES_LEN] attribute_relro =
+const struct _IO_jump_t __io_vtables[IO_VTABLES_NUM] attribute_relro =
{
/* _IO_str_jumps */
[IO_STR_JUMPS] =
{
JUMP_INIT_DUMMY,
--
2.41.0
More information about the Libc-alpha
mailing list