Skip to content

Conversation

@quic-areg
Copy link
Contributor

@quic-areg quic-areg commented Nov 27, 2025

Save 8 bytes per section

return OE->pAddr();
}

void ELFSection::setPaddr(size_t A) {
Copy link
Contributor

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(...);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the assert


void ELFSection::setPaddr(size_t A) {
OutputSectionEntry *OE = getOutputSection();
ASSERT(OE, "expected putput section");
Copy link
Contributor

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]>
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.

3 participants