Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
fdb0ace2
Commit
fdb0ace2
authored
Jul 28, 2015
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add #define for ".bpf.fn."
Signed-off-by:
Brenden Blanco
<
bblanco@plumgrid.com
>
parent
ba7dd24e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
src/cc/bpf_module.cc
src/cc/bpf_module.cc
+1
-1
src/cc/codegen_llvm.cc
src/cc/codegen_llvm.cc
+1
-1
src/cc/codegen_llvm.h
src/cc/codegen_llvm.h
+2
-0
No files found.
src/cc/bpf_module.cc
View file @
fdb0ace2
...
...
@@ -76,7 +76,7 @@ using std::unique_ptr;
using
std
::
vector
;
using
namespace
llvm
;
const
string
BPFModule
::
FN_PREFIX
=
".bpf.fn."
;
const
string
BPFModule
::
FN_PREFIX
=
BPF_FN_PREFIX
;
// Snooping class to remember the sections as the JIT creates them
class
MyMemoryManager
:
public
SectionMemoryManager
{
...
...
src/cc/codegen_llvm.cc
View file @
fdb0ace2
...
...
@@ -1166,7 +1166,7 @@ StatusTuple CodegenLLVM::visit_func_decl_stmt_node(FuncDeclStmtNode *n) {
Function
*
fn
=
mod_
->
getFunction
(
n
->
id_
->
name_
);
if
(
fn
)
return
mkstatus_
(
n
,
"Function %s already defined"
,
n
->
id_
->
c_str
());
fn
=
Function
::
Create
(
fn_type
,
GlobalValue
::
ExternalLinkage
,
n
->
id_
->
name_
,
mod_
);
fn
->
setSection
(
".bpf.fn."
+
n
->
id_
->
name_
);
fn
->
setSection
(
BPF_FN_PREFIX
+
n
->
id_
->
name_
);
BasicBlock
*
label_entry
=
BasicBlock
::
Create
(
ctx
(),
"entry"
,
fn
);
B
.
SetInsertPoint
(
label_entry
);
...
...
src/cc/codegen_llvm.h
View file @
fdb0ace2
...
...
@@ -37,6 +37,8 @@ class StructType;
class
SwitchInst
;
}
#define BPF_FN_PREFIX ".bpf.fn."
namespace
ebpf
{
namespace
cc
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment