-
Notifications
You must be signed in to change notification settings - Fork 35
Feature - Adjustments of SIMD-0189 #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -204,8 +204,8 @@ impl CommonMemoryMapping<'_> { | |
| stack_frame, | ||
| )) | ||
| } else { | ||
| let region_name = match vm_addr & (!ebpf::MM_RODATA_START.saturating_sub(1)) { | ||
| ebpf::MM_RODATA_START => "program", | ||
| let region_name = match vm_addr & (!ebpf::MM_BYTECODE_START.saturating_sub(1)) { | ||
| ebpf::MM_BYTECODE_START => "program", | ||
|
Comment on lines
+207
to
+208
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we include another match arm in here for We could treat both as "program", like we do in < SBPF v3, or we could have "bytecode" and "rodata" messages. Seems probably useful to distinguish between the two, right?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We didn't merge that PR yet, because we have not yet finalized the ABIv2 design. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah okay, thanks. Does it hurt to add the "rodata" arm here though? |
||
| ebpf::MM_STACK_START => "stack", | ||
| ebpf::MM_HEAP_START => "heap", | ||
| ebpf::MM_INPUT_START => "input", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| SECTIONS | ||
| { | ||
| .text 0x000000000 : { | ||
| *(.text*) | ||
| } :text | ||
| .rodata 0x100000000 : { | ||
| .rodata 0x000000000 : { | ||
| *(.rodata*) | ||
| *(.data.rel.ro*) | ||
| BYTE(0); | ||
| . = ALIGN(8); | ||
| } :rodata | ||
| .text 0x100000000 : { | ||
| *(.text*) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to do it here, but if you want, you can remove the |
||
| } :text | ||
| .bss.stack 0x200000000 (NOLOAD) : { | ||
| _stack_start = .; | ||
| . = . + 0x1000; | ||
|
|
@@ -37,8 +37,8 @@ SECTIONS | |
|
|
||
| PHDRS | ||
| { | ||
| text PT_LOAD FLAGS(1); | ||
| rodata PT_LOAD FLAGS(4); | ||
| text PT_LOAD FLAGS(1); | ||
| stack PT_LOAD FLAGS(6); | ||
| heap PT_LOAD FLAGS(6); | ||
| dynsym PT_NULL FLAGS(0); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This restriction is not guaranteed to work. I tested it here and LLD does not output it automatically. In one of the cases, I could only get it once I called
llvm-objcopy --strip-all. I suggest reverting it to the original restriction.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llvm-objcopy --strip-alldoes not work withenable_symbol_and_section_labelsset to true.