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

Resize segment mapping rewritten sections if needed #482 #485

Merged
merged 1 commit into from
Apr 23, 2023

Conversation

brenoguim
Copy link
Collaborator

@brenoguim brenoguim commented Mar 20, 2023

In some cases, the first segment in the executable doesn't map all content up to the next segment. So, sometimes there will be space in the beginning of the file to rewrite sections, but the first segment won't map the whole thing.
In this case, we extend the that segment to include all the needed space.

For this test I had to zero all the progbits and zip the binary. It went from 6MB to 166kb.

@brenoguim brenoguim force-pushed the breno.482_2 branch 2 times, most recently from 1a07a22 to f290cf2 Compare March 20, 2023 11:17
@brenoguim brenoguim marked this pull request as ready for review March 20, 2023 11:17
@brenoguim brenoguim requested a review from Mic92 March 20, 2023 11:34
tests/short-first-segment.sh Outdated Show resolved Hide resolved
@Mic92
Copy link
Member

Mic92 commented Mar 21, 2023

@brenoguim thanks for taking over this one. I did look at ldc in the past but not long enough to understanding the issue.

@Mic92 Mic92 force-pushed the breno.482_2 branch 3 times, most recently from d08bb38 to 061a7f9 Compare April 23, 2023 11:12
@Mic92
Copy link
Member

Mic92 commented Apr 23, 2023

bors merge

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.

None yet

2 participants