Commit 2d92c49
committed
Add export_name attribute and lower it
The rust language requires the export_name attribute to change the name
of a symbol within the assembly whilst keeping a different name at the
language level. This is used multiple times within rust-for-linux.
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc: Change the assembly name on functions
with the export_name attribute. Do not mangle the name.
* util/rust-attribute-values.h: Add export_name attribute value.
* util/rust-attributes.cc: Add export_name attribute to builtin
attribute list.
gcc/testsuite/ChangeLog:
* rust/compile/export_name.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry <[email protected]>1 parent 4d60acd commit 2d92c49
File tree
4 files changed
+32
-3
lines changed- gcc
- rust
- backend
- util
- testsuite/rust/compile
4 files changed
+32
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| 705 | + | |
705 | 706 | | |
706 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
707 | 728 | | |
708 | 729 | | |
709 | | - | |
| 730 | + | |
710 | 731 | | |
711 | 732 | | |
712 | 733 | | |
713 | 734 | | |
714 | 735 | | |
715 | | - | |
716 | | - | |
| 736 | + | |
717 | 737 | | |
718 | 738 | | |
719 | 739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments