aboutsummaryrefslogtreecommitdiff
path: root/sys/tools
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-12-17 20:31:17 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2020-12-17 20:31:17 +0000
commita095390344fb1795c1b118a2f84da8f6a7f254ab (patch)
tree4a3543db0f2cce0a5b13b3e4f22f50cd0feac4ed /sys/tools
parentde66c9a118f8d5ebeb768cf416ecc1938ef1eb76 (diff)
downloadsrc-a095390344fb1795c1b118a2f84da8f6a7f254ab.tar.gz
src-a095390344fb1795c1b118a2f84da8f6a7f254ab.zip
Use a template assembly file for firmware object files.
Similar to r366897, this uses the .incbin directive to pull in a firmware file's contents into a .fwo file. The same scheme for computing symbol names from the filename is used as before to maximize compatiblity and not require rebuilding existing .fwo files for NO_CLEAN builds. Using ld -o binary requires extra hacks in linkers to either specify ABI options (e.g. soft- vs hard-float) or to ignore ABI incompatiblities when linking certain objects (e.g. object files with only data). Using the compiler driver avoids the need for these hacks as the compiler driver is able to set all the appropriate ABI options. Reviewed by: imp, markj Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27579
Notes
Notes: svn path=/head/; revision=368739
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/fw_stub.awk4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/tools/fw_stub.awk b/sys/tools/fw_stub.awk
index ea9f6ab8cd9b..807c51b6190b 100644
--- a/sys/tools/fw_stub.awk
+++ b/sys/tools/fw_stub.awk
@@ -143,7 +143,7 @@ if (opt_l) {
for (file_i = 0; file_i < num_files; file_i++) {
symb = filenames[file_i];
- # '-', '.' and '/' are converted to '_' by ld/objcopy
+ # '-', '.' and '/' are converted to '_'
gsub(/-|\.|\//, "_", symb);
printc("extern char _binary_" symb "_start[], _binary_" symb "_end[];");
}
@@ -170,7 +170,7 @@ for (file_i = 0; file_i < num_files; file_i++) {
short = shortnames[file_i];
symb = filenames[file_i];
version = versions[file_i];
- # '-', '.' and '/' are converted to '_' by ld/objcopy
+ # '-', '.' and '/' are converted to '_'
gsub(/-|\.|\//, "_", symb);
reg = "\t\tfp = ";