W3cubDocs

/GCC 12

3.19.14 eBPF Options

-mframe-limit=bytes

This specifies the hard limit for frame sizes, in bytes. Currently, the value that can be specified should be less than or equal to ‘32767’. Defaults to whatever limit is imposed by the version of the Linux kernel targeted.

-mkernel=version

This specifies the minimum version of the kernel that will run the compiled program. GCC uses this version to determine which instructions to use, what kernel helpers to allow, etc. Currently, version can be one of ‘4.0’, ‘4.1’, ‘4.2’, ‘4.3’, ‘4.4’, ‘4.5’, ‘4.6’, ‘4.7’, ‘4.8’, ‘4.9’, ‘4.10’, ‘4.11’, ‘4.12’, ‘4.13’, ‘4.14’, ‘4.15’, ‘4.16’, ‘4.17’, ‘4.18’, ‘4.19’, ‘4.20’, ‘5.0’, ‘5.1’, ‘5.2’, ‘latest’ and ‘native’.

-mbig-endian

Generate code for a big-endian target.

-mlittle-endian

Generate code for a little-endian target. This is the default.

-mjmpext

Enable generation of extra conditional-branch instructions. Enabled for CPU v2 and above.

-mjmp32

Enable 32-bit jump instructions. Enabled for CPU v3 and above.

-malu32

Enable 32-bit ALU instructions. Enabled for CPU v3 and above.

-mcpu=version

This specifies which version of the eBPF ISA to target. Newer versions may not be supported by all kernels. The default is ‘v3’.

Supported values for version are:

v1

The first stable eBPF ISA with no special features or extensions.

v2

Supports the jump extensions, as in -mjmpext.

v3

All features of v2, plus:

  • - 32-bit jump operations, as in -mjmp32
  • - 32-bit ALU operations, as in -malu32
-mco-re

Enable BPF Compile Once - Run Everywhere (CO-RE) support. Requires and is implied by -gbtf.

-mno-co-re

Disable BPF Compile Once - Run Everywhere (CO-RE) support. BPF CO-RE support is enabled by default when generating BTF debug information for the BPF target.

-mxbpf

Generate code for an expanded version of BPF, which relaxes some of the restrictions imposed by the BPF architecture:

  • - Save and restore callee-saved registers at function entry and exit, respectively.

Next: , Previous: , Up: Submodel Options [Contents][Index]

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/eBPF-Options.html