To place the trailer code to the end of the application code, move the trailer code into separate file trailer.s.
List the trailer.o at the end of linker list of the object files.
I am not familiar with any compiler directive, which provides ordering of the object files in the linker list. You can edit the linker command line manually.
The alternative (dirty) way is to place label "_trailer:" at constant (big enough) address with .org directive.