-
Notifications
You must be signed in to change notification settings - Fork 2
6l: use ELF32 (ELFCLASS32) format for Plan9 ELF output #147
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,19 @@ elfinit(void) | |
| } | ||
| } | ||
|
|
||
| /* elfforce32: switch to ELF32 format after elfinit(). | ||
| * Plan9's kernel exec only accepts ELF32, even on amd64. */ | ||
| void | ||
| elfforce32(void) | ||
| { | ||
| elf64 = 0; | ||
| hdr.phoff = ELF32HDRSIZE; | ||
| hdr.shoff = ELF32HDRSIZE; | ||
| hdr.ehsize = ELF32HDRSIZE; | ||
| hdr.phentsize = ELF32PHDRSIZE; | ||
| hdr.shentsize = ELF32SHDRSIZE; | ||
|
Comment on lines
+77
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The elf64 = 0;
hdr.ident[EI_CLASS] = ELFCLASS32;
hdr.phoff = ELF32HDRSIZE;
hdr.shoff = ELF32HDRSIZE;
hdr.ehsize = ELF32HDRSIZE;
hdr.phentsize = ELF32PHDRSIZE;
hdr.shentsize = ELF32SHDRSIZE; |
||
| } | ||
|
|
||
| ElfEhdr* | ||
| getElfEhdr(void) | ||
| { | ||
|
|
||
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.
The comment style for
elfforce32is inconsistent with the standard Plan 9 multi-line comment style used elsewhere in the project. It is recommended to use the standard format for better maintainability and consistency.