Commit 859749d
clyon
[ARM/FDPIC v6 09/24] [ARM] FDPIC: Add support for taking address of nested function
In FDPIC mode, the trampoline generated to support pointers to nested
functions looks like:
.word trampoline address
.word trampoline GOT address
ldr r12, [pc, gcc-mirror#8]
ldr r9, [pc, gcc-mirror#8]
ldr pc, [pc, gcc-mirror#8]
.word static chain value
.word GOT address
.word function's address
because in FDPIC function pointers are actually pointers to function
descriptors, we have to actually generate a function descriptor for
the trampoline.
2019--09-10 Christophe Lyon <christophe.lyon@st.com>
Mickaël Guêné <mickael.guene@st.com>
gcc/
* config/arm/arm.c (arm_asm_trampoline_template): Add FDPIC
support.
(arm_trampoline_init): Likewise.
(arm_trampoline_adjust_address): Likewise.
* config/arm/arm.h (TRAMPOLINE_SIZE): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275571 138bc75d-0d04-0410-961f-82ee72b054a41 parent 2ec82e4 commit 859749d
3 files changed
+87
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
1 | 11 | | |
2 | 12 | | |
3 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3939 | 3939 | | |
3940 | 3940 | | |
3941 | 3941 | | |
3942 | | - | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
3943 | 3954 | | |
3944 | 3955 | | |
3945 | 3956 | | |
3946 | 3957 | | |
3947 | 3958 | | |
3948 | 3959 | | |
3949 | | - | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
| 3976 | + | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
3950 | 3988 | | |
3951 | 3989 | | |
3952 | 3990 | | |
| |||
3987 | 4025 | | |
3988 | 4026 | | |
3989 | 4027 | | |
3990 | | - | |
3991 | | - | |
| 4028 | + | |
| 4029 | + | |
| 4030 | + | |
| 4031 | + | |
| 4032 | + | |
| 4033 | + | |
| 4034 | + | |
| 4035 | + | |
| 4036 | + | |
| 4037 | + | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
| 4048 | + | |
| 4049 | + | |
| 4050 | + | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
| 4054 | + | |
| 4055 | + | |
| 4056 | + | |
3992 | 4057 | | |
3993 | | - | |
3994 | | - | |
3995 | | - | |
| 4058 | + | |
| 4059 | + | |
| 4060 | + | |
| 4061 | + | |
3996 | 4062 | | |
3997 | 4063 | | |
3998 | 4064 | | |
| |||
4006 | 4072 | | |
4007 | 4073 | | |
4008 | 4074 | | |
4009 | | - | |
| 4075 | + | |
| 4076 | + | |
| 4077 | + | |
4010 | 4078 | | |
4011 | 4079 | | |
4012 | 4080 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
1598 | | - | |
| 1598 | + | |
1599 | 1599 | | |
1600 | 1600 | | |
1601 | 1601 | | |
| |||
0 commit comments