-
Notifications
You must be signed in to change notification settings - Fork 42
Move PAddr from ELFSection to OutputSectionEntry #635
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
base: main
Are you sure you want to change the base?
Conversation
| return OE->pAddr(); | ||
| } | ||
|
|
||
| void ELFSection::setPaddr(size_t A) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be an assert to call setPaddr on input sections that do not have any corresponding OutputSectionEntry. Or perhaps, we should not expose this function through ELFSection and the users that want to set physical address should use:
auto *OSE = S->getOutputSectionEntry();
ASSERT(OSE != nullptr, ...);
OSE->setPaddr(...);There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the assert
Signed-off-by: quic-areg <[email protected]>
lib/Readers/ELFSection.cpp
Outdated
|
|
||
| void ELFSection::setPaddr(size_t A) { | ||
| OutputSectionEntry *OE = getOutputSection(); | ||
| ASSERT(OE, "expected putput section"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit : spell check
Signed-off-by: quic-areg <[email protected]>
Save 8 bytes per section