Page MenuHomeFreeBSD

sys: rename preprocessed assembly-language files to .S
AcceptedPublic

Authored by ehem_freebsd_m5p.com on Jul 25 2022, 7:45 PM.

Details

Reviewers
manu
imp
Summary

Even though assembly-language .s files aren't supposed to be run through
cpp, clearly all of these are being preprocessed (#include is a strong
indicator). A few potentially non-preprocessed files remain named .s.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 46617
Build 43506: arc lint + arc unit

Event Timeline

Bit of filename cleanup which seems overdue. Most assembly language files come from contrib and those are consistently <something>.S. Most of these are for i386 or the linux_*.s files. Everywhere else is <something>.S. Notably AMD64, ARM64 and PowerPC don't have a single .s file besides the linux_*.s files.

.S has won the battle for favored assembly-language source filename pattern.

Note that it's not just a preference for one of two equivalent extensions, but .s and .S actually have a different meaning. The former uses/used the assembler directly, while the latter uses the compiler driver and passes the input through the preprocessor. This change may be [probably is] the right thing to do, but the motivation should be "these files are supposed to be preprocessed via the compiler driver" or more likely "these files are already being preprocessed via the compiler driver" via bespoke Make rules, and thus the .s to .S change is really making the extension consistent with the use.

sys/modules/linux64/Makefile
61

this is strange - I'm not sure why the linker script had a .s extension in the first place

ehem_freebsd_m5p.com retitled this revision from sys: rename asm.s files to asm.S to sys: rename preprocessed assembly-language files to .S.Jul 26 2022, 9:49 PM
ehem_freebsd_m5p.com edited the summary of this revision. (Show Details)
ehem_freebsd_m5p.com marked an inline comment as done.

Updating message as per @emaste's comment. Removing the renaming of the *.lds.s files since those do appear to be a distinct situation.

I've got nothing beyond what others have suggested and you've done... Thanks!

This revision is now accepted and ready to land.Jul 26 2022, 9:55 PM

Copied to GitHub. I'm wondering about renaming the "linux*_vdso.lds.s" files to "linux*_vdso.lds" since I believe that is the more common pattern for linker scripts.

sys/modules/linux64/Makefile
61

Yeah did look a bit odd. Fairly likely this shouldn't be part of D35908.