Skip to content

Commit

Permalink
license: Add preamble to non-eBPF C/include files
Browse files Browse the repository at this point in the history
The eBPF code in this repository is licensed under GPL.
  • Loading branch information
christos68k committed Apr 15, 2024
1 parent 527745e commit 45fc48f
Show file tree
Hide file tree
Showing 14 changed files with 84 additions and 0 deletions.
6 changes: 6 additions & 0 deletions interpreter/php/decode_amd64.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

//go:build amd64
#include <Zydis/Zydis.h>
#include "decode_amd64.h"
Expand Down
6 changes: 6 additions & 0 deletions interpreter/php/decode_amd64.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

//go:build amd64
#ifndef __INCLUDED_PHP_DECODE_X86_64__
#define __INCLUDED_PHP_DECODE_X86_64__
Expand Down
6 changes: 6 additions & 0 deletions interpreter/python/decode_amd64.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

//go:build amd64

#include <Zydis/Zydis.h>
Expand Down
6 changes: 6 additions & 0 deletions interpreter/python/decode_amd64.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

//go:build amd64

#ifndef __PYTHON_DECODE_X86_64__
Expand Down
6 changes: 6 additions & 0 deletions libpf/pfelf/testdata/fixed-address.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

__attribute__((section(".coffee_section")))
int function_at_fixed_address(void) {
return 0;
Expand Down
6 changes: 6 additions & 0 deletions libpf/pfelf/testdata/test.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

#ifndef LINUX_VERSION
#define LINUX_VERSION ""
#endif
Expand Down
6 changes: 6 additions & 0 deletions reporter/testdata/test.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

#include <unistd.h>

int main(int argc, char *argv[]) {
Expand Down
6 changes: 6 additions & 0 deletions tpbase/fsbase_decode_amd64.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

//go:build amd64

#include <Zydis/Zydis.h>
Expand Down
6 changes: 6 additions & 0 deletions tpbase/fsbase_decode_amd64.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

//go:build amd64

#ifndef __FSBASE_DECODE_X86_64__
Expand Down
6 changes: 6 additions & 0 deletions tpbase/libc_decode_amd64.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

//go:build amd64

#include <Zydis/Zydis.h>
Expand Down
6 changes: 6 additions & 0 deletions tpbase/libc_decode_amd64.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

//go:build amd64

#ifndef LIBC_DECODE_X86_64
Expand Down
6 changes: 6 additions & 0 deletions utils/coredump/testsources/c/brokenstack.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

// Example application that intentionally breaks its stack.
//
// cc -O2 -g -o brokenstack brokenstack.c
Expand Down
6 changes: 6 additions & 0 deletions utils/coredump/testsources/c/sig.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

#include<stdio.h>
#include<signal.h>
#include<unistd.h>
Expand Down
6 changes: 6 additions & 0 deletions utils/coredump/testsources/c/stackalign.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Apache License 2.0.
* See the file "LICENSE" for details.
*/

// gcc -O3 -fomit-frame-pointer -mavx -ftree-vectorize stackalign.c -o stackalign

#include <unistd.h>
Expand Down

0 comments on commit 45fc48f

Please sign in to comment.