diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-14 16:43:01 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-14 16:43:01 +0000 |
commit | dbe6e66d6a8addbbf9438f40a645be8ae105fa8a (patch) | |
tree | a745eb3196d4c031568256345790d85bc29edc63 /scripts/trylink | |
parent | a1120a8ea29d4a825cbbb796fa15d77b15ca401f (diff) | |
download | busybox-w32-dbe6e66d6a8addbbf9438f40a645be8ae105fa8a.tar.gz busybox-w32-dbe6e66d6a8addbbf9438f40a645be8ae105fa8a.tar.bz2 busybox-w32-dbe6e66d6a8addbbf9438f40a645be8ae105fa8a.zip |
trylink: automatically use custom link script if user provides one
vinfo_msg: one user (info_msg), incorporate in it
*: style fixes
Diffstat (limited to '')
-rwxr-xr-x | scripts/trylink | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/scripts/trylink b/scripts/trylink index 9b67deb49..5e962307b 100755 --- a/scripts/trylink +++ b/scripts/trylink | |||
@@ -64,16 +64,18 @@ done | |||
64 | echo "Final link with: $BBOX_LIB_LIST" | 64 | echo "Final link with: $BBOX_LIB_LIST" |
65 | l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'` | 65 | l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'` |
66 | # --verbose gives us gobs of info to stdout (e.g. linker script used) | 66 | # --verbose gives us gobs of info to stdout (e.g. linker script used) |
67 | try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose" "$@" >busybox_ld.out ####|| exit 1 | 67 | if ! test -f busybox_ldscript; then |
68 | # | 68 | try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose" "$@" >busybox_ld.out ####|| exit 1 |
69 | # Add SORT_BY_ALIGNMENT to linker script (found in busybox_ld.out): | 69 | else |
70 | # .rodata : { *(.rodata SORT_BY_ALIGNMENT(.rodata.*) .gnu.linkonce.r.*) } | 70 | echo "Custom linker script 'busybox_ldscript' found, using it" |
71 | # *(.data SORT_BY_ALIGNMENT(.data.*) .gnu.linkonce.d.*) | 71 | # Add SORT_BY_ALIGNMENT to linker script (found in busybox_ld.out): |
72 | # *(.bss SORT_BY_ALIGNMENT(.bss.*) .gnu.linkonce.b.*) | 72 | # .rodata : { *(.rodata SORT_BY_ALIGNMENT(.rodata.*) .gnu.linkonce.r.*) } |
73 | # This will eliminate most of the data padding. Use linker script | 73 | # *(.data SORT_BY_ALIGNMENT(.data.*) .gnu.linkonce.d.*) |
74 | # by commenting "try" above and uncommenting this one (tested on i386): | 74 | # *(.bss SORT_BY_ALIGNMENT(.bss.*) .gnu.linkonce.b.*) |
75 | #try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose -Wl,-T -Wl,busybox_ldscript" "$@" >busybox_ld.out | 75 | # This will eliminate most of the data padding. Use linker script |
76 | # | 76 | # by commenting "try" above and uncommenting this one (tested on i386): |
77 | try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose -Wl,-T -Wl,busybox_ldscript" "$@" >busybox_ld.out | ||
78 | fi | ||
77 | ####} | 79 | ####} |
78 | ####rm busybox_ld.err | 80 | ####rm busybox_ld.err |
79 | ####exit 0 # Ensure "success" exit code | 81 | ####exit 0 # Ensure "success" exit code |