Skip to content
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

SiFive: Add -z force-zicfilp option #10

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

hau-hsu
Copy link

@hau-hsu hau-hsu commented Oct 24, 2023

No description provided.

@hau-hsu
Copy link
Author

hau-hsu commented Oct 24, 2023

Internal Jira: SCT-3082

@hau-hsu
Copy link
Author

hau-hsu commented Oct 24, 2023

Oh I need to change --force-zicfilp to -z zicfilp (referenced to older aarch64 implementation ...).

Add .ifdef in assembly code to control whether we want to add landing
pad or shadow stack GNU properties.
@hau-hsu hau-hsu force-pushed the dev/hauh/add-force-zicfilp branch 2 times, most recently from eccfb45 to b79b8c1 Compare October 25, 2023 04:14
Copy link
Member

@kito-cheng kito-cheng left a comment

Choose a reason for hiding this comment

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

LGTM with 3 minor comment, feel free to merge once addressed.

typedef enum
{
PLT_NORMAL = 0x0, /* Normal plts. */
PLT_ZICFILP = 0x1 /* Landing pad plts. */
Copy link
Member

Choose a reason for hiding this comment

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

Two space after dot.

Copy link
Member

@kito-cheng kito-cheng Oct 26, 2023

Choose a reason for hiding this comment

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

also, maybe align like that:

    PLT_NORMAL  = 0x0,  /* Normal plts.  */
    PLT_ZICFILP = 0x1   /* Landing pad plts.  */

@@ -2751,7 +2751,7 @@ _bfd_riscv_elf_link_setup_gnu_properties (struct bfd_link_info *info,
uint32_t *and_prop_p, uint32_t *or_prop_p)
{
asection *sec;
bfd *pbfd;
bfd *pbfd; /* pointer bfd */
Copy link
Member

Choose a reason for hiding this comment

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

Should we really need this comment?

@@ -184,6 +184,13 @@ struct _bfd_riscv_elf_obj_tdata

/* All GNU_PROPERTY_RISCV_FEATURE_2_OR properties. */
uint32_t gnu_or_prop;

/* True to warn when linking objects with incompatible
GNU_PROPERTY_RISCV_FEATURE_1_ZICFILP. */
Copy link
Member

Choose a reason for hiding this comment

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

Two space after dot.

@hau-hsu hau-hsu force-pushed the dev/hauh/add-force-zicfilp branch from b79b8c1 to 89dd467 Compare October 27, 2023 07:27
@hau-hsu hau-hsu merged commit ce77d76 into riscv-binutils-2.41-cfi Nov 21, 2023
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