Add LoongArch Support#1
Open
loongson-zn wants to merge 2 commits into
Open
Conversation
Collaborator
Author
|
修改前输出: 修改后输出: |
xen0n
reviewed
Apr 6, 2023
|
这是直接把 32位干掉了吗?现在用的这个名字,看起来就是不会再给32位任何机会了啊 |
Collaborator
Author
根据新的binutils 来写的 |
xen0n
reviewed
Apr 6, 2023
| return false; | ||
| } | ||
|
|
||
| return (processor_flag() & static_cast<uint32_t>(f)) > 0; |
Member
There was a problem hiding this comment.
这边看看能不能有机会正确处理 EF_LOONGARCH_OBJABI_V1:如果 f 是这玩意,则 mask 出位域做相等比较,否则像现在写法一样做 bitwise and 比较。
工程实践上,操作这个 flag 完全是合理需求,所以如果你要适配这个库,一定要支持它。
Collaborator
Author
There was a problem hiding this comment.
这边看看能不能有机会正确处理 EF_LOONGARCH_OBJABI_V1:如果 f 是这玩意,则 mask 出位域做相等比较,否则像现在写法一样做 bitwise and 比较。
手头紧急工作告一段落,接着搞LIEF。 我咨询了一下相关的同事,上游支持的代码都是新世界的,不考虑旧世界,上游默认都是V1
现在用 ELFCLASS32/ELFCLASS64 区分 32 位和 64 位。 |
这样说就靠谱多了,名字也比原来看着舒服些。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
增加LA的支持,please review,thanks! @loongarch64/dev-team