This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c plugin guidance wanted


I would like to implement a gcc plugin that can compress an
__attribute__((format(printf, x, y))) const char array before
storage so that the formats can be size reduced when stored and
expanded appropriately before use.

As this is the first plugin I am trying to implement, I'm a bit
lost in details and I am looking for guidance.

Basically:

Take the printf_format_type CONST_DECL format being verified by
gcc/c-format-main.c and after the verification, compress the
format and its length before storage into its .read_only section.

A custom vsnprintf routine would expand the compressed format to
its original form before use.

All tips to necessary gcc plugin implementation details appreciated.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]