Much of this file is identical across the architectures we support, so share a common implementation by adding a little #ifdef-ery.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/boot/efi/loader/reloc.c | ||
---|---|---|
105 ↗ | (On Diff #4701) | Would it make sense for each architecture to define R_NONE and R_RELATIVE (or similar)? e.g. #if defined(__amd64__) #define R_NONE R_X86_64_NONE #define R_RELATIVE R_X86_64_RELATIVE #elif defined(__arm__) ... |
Comment Actions
I like this, and also Andy's suggestion.
sys/boot/efi/loader/reloc.c | ||
---|---|---|
105 ↗ | (On Diff #4701) | We could add that at the top, and handle any special cases that come up... |
sys/boot/efi/loader/reloc.c | ||
---|---|---|
105 ↗ | (On Diff #4701) | Right, we could easily handle relocation types that don't apply to a given arch as well, a la: #if defined RELOC_TYPE_RELATIVE case RELOC_TYPE_RELATIVE: ... #endif new version coming up shortly |
Comment Actions
Incorporate #define change suggested by @andrew and add Makefile .PATH setting to pick up reloc.c