Testing Done: |
|
---|
crt: Need a position-independent CRT for PIE
Review Request #285 — Created Dec. 6, 2016 and submitted
Information | |
---|---|
richlowe | |
illumos-gate | |
477e605... | |
Reviewers | |
general | |
- Implement the greatest possible part of the crt1 in C - Implement SPARC versions of the ASM sections of crt1 - Build crt1 position-independently, minor ASM updates to be position independent - Implement crt1 with the hook expected by modern GCC to support profiling, make gcrt1 a symlink for source compatibility (older GCC initializes profiling at firsnt use of _mcount if necessary, so doesn't need the gcrt) - Split the CRT out of developer/library/lint into a separate c-runtime package
This is the initial step of a PIE implementation. I have tested this with the rest of that implementation and (less thoroughly) stand-alone.
-
-
-
usr/src/lib/crt/amd64/mach-crt1.s (Diff revision 1) Maybe this 16-byte alignment deserves some comment explaining why it is needed. Something similar as it is in the i86 code.
-
usr/src/lib/crt/sparc/mach-crt1.s (Diff revision 1) This looks like a small comment alignment issue.
-
usr/src/lib/crt/sparc/mach-crt1.s (Diff revision 1) What will happen in a case the _start_crt() returns?
-
-
Thanks for putting this together Rich. Moving a lot of this out of the asm is a big help. I think in general, this looks good. I'm not sure if we may have an ABI problem with Studio or not, but harder to care about that anyways (I don't really know who'd still use Studio as primary).
-
usr/src/lib/crt/Makefile.com (Diff revision 1) Because we're only building an object file, I guess a final $(POST_PROCESS) doesn't make any sense, right?
Change Summary:
Robert and most of Marcel's comments
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+524 -1328) |