diff options
author | Florian Weimer <fweimer@redhat.com> | 2015-03-01 21:47:31 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2015-03-06 10:29:49 +0100 |
commit | 627e7a5f5bd3c623108fe5a4f86294d893fadbf2 (patch) | |
tree | d7ad9fb2d511a5f6d832da53e5a14ff2fc5809c4 /stdio-common | |
parent | d176a41a62cad5cee4541176077380a84c0f49d7 (diff) | |
download | glibc-627e7a5f5bd3c623108fe5a4f86294d893fadbf2.tar.gz glibc-627e7a5f5bd3c623108fe5a4f86294d893fadbf2.tar.xz glibc-627e7a5f5bd3c623108fe5a4f86294d893fadbf2.zip |
vfprintf: Introduce JUMP_TABLE_BASE_LABEL
This makes the offset handling more explicit and avoids cross-references between the jump tables.
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/vfprintf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index d575994d36..030d33d981 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -304,7 +304,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) spec = (ChExpr); \ offset = NOT_IN_JUMP_RANGE (spec) ? REF (form_unknown) \ : table[CHAR_CLASS (spec)]; \ - ptr = &&do_form_unknown + offset; \ + ptr = &&JUMP_TABLE_BASE_LABEL + offset; \ goto *ptr; \ } \ while (0) @@ -1329,7 +1329,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) do { #ifdef SHARED -# define REF(Name) &&do_##Name - &&do_form_unknown +# define JUMP_TABLE_BASE_LABEL do_form_unknown +# define REF(Name) (&&do_##Name - &&JUMP_TABLE_BASE_LABEL) #else # define REF(Name) &&do_##Name #endif @@ -1897,7 +1898,9 @@ do_positional: { #undef REF #ifdef SHARED -# define REF(Name) &&do2_##Name - &&do_form_unknown +# undef JUMP_TABLE_BASE_LABEL +# define JUMP_TABLE_BASE_LABEL do2_form_unknown +# define REF(Name) (&&do2_##Name - &&JUMP_TABLE_BASE_LABEL) #else # define REF(Name) &&do2_##Name #endif |