Page MenuHomeFreeBSD

Refactor ELF interpreter loading into a separate function.
ClosedPublic

Authored by trasz on Mar 28 2019, 10:22 PM.
Tags
None
Referenced Files
F147323057: D19741.id55881.diff
Mon, Mar 9, 11:35 PM
F147249379: D19741.id55666.diff
Mon, Mar 9, 10:45 AM
F147236424: D19741.id55666.diff
Mon, Mar 9, 8:30 AM
F147217265: D19741.id55940.diff
Mon, Mar 9, 5:06 AM
F147215802: D19741.id55940.diff
Mon, Mar 9, 4:51 AM
Unknown Object (File)
Fri, Mar 6, 8:05 PM
Unknown Object (File)
Fri, Mar 6, 5:56 AM
Unknown Object (File)
Fri, Mar 6, 12:41 AM
Subscribers

Details

Summary

Refactor ELF interpreter loading into a separate function.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/kern/imgact_elf.c
981 ↗(On Diff #55566)

This block is irrelevant for the task of loading the interpreter. I must not be moved.

sys/kern/imgact_elf.c
961 ↗(On Diff #55666)

This block of if() can be naturally moved before calculating newinterp.

971 ↗(On Diff #55666)

How could newinterp != NULL and brand_info->interp_path == NULL ?

sys/kern/imgact_elf.c
971 ↗(On Diff #55666)

The newinterp comes from brand_info->interp_newpath, not brand_info->interp_path.

More rework - goto is done, as is the 'newinterp' variable.

Looks fine, please test with 32bit binary.

This revision is now accepted and ready to land.Apr 6 2019, 3:07 PM
This revision was automatically updated to reflect the committed changes.