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

Dev master #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Dev master #2

wants to merge 3 commits into from

Conversation

yetist
Copy link
Contributor

@yetist yetist commented May 18, 2023

@loongarch64/dev-team

看看现在这个好没好,可以测试一下systemd、fwupd等软件

@yetist yetist requested a review from a team May 18, 2023 12:24
*(COMMON)
. = ALIGN(16);
_bss_end = .;
}

.rela.dyn : { *(.rela.dyn) }
. = ALIGN(4096);
Copy link
Member

Choose a reason for hiding this comment

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

这些为啥像是 4KiB 对齐?如果意图是对齐到“页”的话,按照 Linux 源码,最大 64KiB,常用 16KiB。

(比较蛋疼的是 UEFI 规范没提使用多大的页,估计是因为 LoongArch UEFI 应用的初始执行环境是物理地址映射吧,不需要分页。)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

主要是对齐,以解决RWX警告问题。
Arm64的做法是由于上游binutils 2.38 支持了 efi-app-aarch64,所以 crt0.S 和 lds 链接脚本做了大量修改,而LA和Riscv还没有这个特性的支持,所以参考Riscv的改法做了处理,主要是把相关的segment对齐并分离,以避免链接时警告(上游不接受改LDFLAGS的解法)。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

其它架构看起来都是4k对齐,不知道LA上是否应该选择其它大小来对齐,比如16k?

Added CHAR8, CHAR16, WCHAR and VOID type definitions for LoongArch
Binutils 2.41 now supports efi-app-loongarch64, so to use this we must add a
dummy reloc section and remove the PE header definition from crt0 as this will
conflict with the version added by objcopy

Signed-off-by: Xiaotian Wu <[email protected]>
@yetist yetist changed the base branch from master to la64/master August 24, 2023 03:38
@yetist yetist changed the base branch from la64/master to master August 24, 2023 03:38
@yetist
Copy link
Contributor Author

yetist commented Aug 24, 2023

@loongarch64/dev-team

现在使用了 efi-app-loongarch64 来编译,各位可以测试一下。shim我测试能编译运行了

@yetist
Copy link
Contributor Author

yetist commented Aug 24, 2023

shim 在这里: https://github.com/yetist/shim/tree/dev-la64

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