Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  linked_vars1.c

  Sprache: C
 

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2021 Facebook */

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>

extern int LINUX_KERNEL_VERSION __kconfig;
/* this weak extern will be strict due to the other file's strong extern */
extern bool CONFIG_BPF_SYSCALL __kconfig __weak;
extern const void bpf_link_fops __ksym __weak;

int input_bss1;
int input_data1 = 1;
const volatile int input_rodata1 = 11;

int input_bss_weak __weak;
/* these two definitions should win */
int input_data_weak __weak = 10;
const volatile int input_rodata_weak __weak = 100;

extern int input_bss2;
extern int input_data2;
extern const int input_rodata2;

int output_bss1;
int output_data1;
int output_rodata1;

long output_sink1;

static __noinline int get_bss_res(void)
{
 /* just make sure all the relocations work against .text as well */
 return input_bss1 + input_bss2 + input_bss_weak;
}

SEC("raw_tp/sys_enter")
int BPF_PROG(handler1)
{
 output_bss1 = get_bss_res();
 output_data1 = input_data1 + input_data2 + input_data_weak;
 output_rodata1 = input_rodata1 + input_rodata2 + input_rodata_weak;

 /* make sure we actually use above special externs, otherwise compiler
 * will optimize them out
 */

 output_sink1 = LINUX_KERNEL_VERSION
         + CONFIG_BPF_SYSCALL
         + (long)&bpf_link_fops;
 return 0;
}

char LICENSE[] SEC("license") = "GPL";

Messung V0.5 in Prozent
C=96 H=96 G=95

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=655579