This is the mail archive of the gcc-bugs@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]

[Bug other/12534] New: Add flag that enforces minimum generated size of a function


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12534

           Summary: Add flag that enforces minimum generated size of a
                    function
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mkgnu at gmx dot net
                CC: gcc-bugs at gcc dot gnu dot org

This is a feature request

I would like to request a flag that would force the code generation
piece of gcc to generate functions that occupy at least x bytes in size.
Something linke -fforce-min-size=x.

The intent is to be able to redirect execution flow of a function during
runtime by ovewritting the beginning of a function image with a jump
instruction that will move control flow somewhere else. If for example 
a "jmp *0x<address>" was used, this would require that a function
occupies at least 6 bytes in x86 so the jump instruction can be
installed without overwriting anything after the end of a function.


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