Skip to content

std.os.linux.start_pie: Add arc, csky, and hexagon support (and arm variants) - #20776

Merged
andrewrk merged 4 commits into
ziglang:masterfrom
alexrp:start-pie-more-arches
Jul 26, 2024
Merged

std.os.linux.start_pie: Add arc, csky, and hexagon support (and arm variants)#20776
andrewrk merged 4 commits into
ziglang:masterfrom
alexrp:start-pie-more-arches

Conversation

@alexrp

@alexrp alexrp commented Jul 24, 2024

Copy link
Copy Markdown
Member

No description provided.

: [ret] "=r" (-> [*]elf.Dyn),
),
// The CSKY ABI requires the gb register to point to the GOT. Additionally, the first
// entry in the GOT is defined to hold the address of _DYNAMIC.

@alexrp alexrp Jul 24, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf

This will of course need code in start.zig to set gb. I'll do that in a follow-up PR.

\\ ldw %[ret], %[ret]
: [ret] "=r" (-> [*]elf.Dyn),
),
.hexagon => asm volatile (

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.arc => asm volatile (
\\ .weak _DYNAMIC
\\ .hidden _DYNAMIC
\\ add %[ret], pcl, _DYNAMIC@pcl

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, PCL is the PC in ARC ("Program Counter Long-Word").

@alexrp alexrp mentioned this pull request Jul 25, 2024
4 tasks
@andrewrk
andrewrk merged commit f2bf6c1 into ziglang:master Jul 26, 2024
@alexrp
alexrp deleted the start-pie-more-arches branch July 26, 2024 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants