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

Try not to use ELF and GNU-EFI CRT #1

Open
Artoria2e5 opened this issue Apr 27, 2020 · 1 comment
Open

Try not to use ELF and GNU-EFI CRT #1

Artoria2e5 opened this issue Apr 27, 2020 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@Artoria2e5
Copy link

Artoria2e5 commented Apr 27, 2020

The whole process of making a ELF using gcc and then wrapping it into a PE is dumb. There are tools you can use to just make a PE directly. People seem to prefer LLVM/clang for that, since it supports all architectures by default via a --target switch.

  • The basic CFLAGS is --target $(GCC_ARCH)-unknown-windows -ffreestanding -fshort-wchar -fno-stack-protector. You have most of that.
  • The LDFLAGS are basically the same as what you have right now.
@Jamesits
Copy link
Owner

The makefile is copied from https://github.com/pbatard/uefi-simple/blob/c3c7d4b794322bb3b9c0483a569a83458eddda25/Makefile and I've never used it :( I'll try a migration to LLVM/clang.

@Jamesits Jamesits added the help wanted Extra attention is needed label May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants