-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added example that produces symbols which are contained fully within another * updated the README with this example
- Loading branch information
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ sqlelf.egg-info/ | |
.vscode/ | ||
dist/ | ||
result | ||
examples/shadowed-symbols/exe | ||
examples/**/exe | ||
examples/**/*.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Variables | ||
CC = gcc | ||
CFLAGS = -Wall -O2 | ||
TARGET = exe | ||
SRC = nested.c | ||
|
||
# Default rule | ||
all: $(TARGET) | ||
|
||
$(TARGET): $(SRC) | ||
$(CC) $(CFLAGS) -o $@ $< | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -f $(TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <stdio.h> | ||
|
||
void outer_function() { | ||
printf("This is the beginning of the outer function.\n"); | ||
|
||
asm volatile( | ||
".global inner_symbol\n" | ||
"inner_symbol:\n" | ||
"nop\n"); | ||
|
||
printf("This is the end of the outer function.\n"); | ||
} | ||
|
||
int main() { | ||
outer_function(); | ||
return 0; | ||
} |