diff options
author | Nicolas Boichat <drinkcat@google.com> | 2017-07-12 17:07:27 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-07-17 21:27:14 -0700 |
commit | cc6662135d38f1544d655cf1d4d0f1f3e3d059b7 (patch) | |
tree | 588520f37b159f82f7cccc4bebbaa702abd9170d /include/usb_descriptor.h | |
parent | 412093d046ec6eab64798f70bff98c8865f709d3 (diff) | |
download | chrome-ec-cc6662135d38f1544d655cf1d4d0f1f3e3d059b7.tar.gz |
hammer: Enable Link-Time-Optimization CONFIG_LTO
We need to add __keep to the USB descriptors, otherwise they
get thrown away.
Also, for some reason the optimized RWSIG task uses a little bit
more stack space, so account for that:
1 RWSIG 00000000 0.264350 1096/2048
BRANCH=none
BUG=b:63610290
TEST=make BOARD=hammer -j
make newsizes
build/hammer/RO/ec.RO.flat shrank by 2052 bytes: (37336 to 35284)
build/hammer/RW/ec.RW.flat shrank by 3172 bytes: (50508 to 47336)
Flash hammer, touchpad, keyboard, update all still work fine.
Change-Id: I39ffd320dae883596ce481efc4adec6e3c23000b
Reviewed-on: https://chromium-review.googlesource.com/567909
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/usb_descriptor.h')
-rw-r--r-- | include/usb_descriptor.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb_descriptor.h b/include/usb_descriptor.h index c6e877aac6..33fde009d2 100644 --- a/include/usb_descriptor.h +++ b/include/usb_descriptor.h @@ -276,7 +276,7 @@ extern struct usb_string_desc *usb_serialno_desc; /* Use these macros for declaring descriptors, to order them properly */ #define USB_CONF_DESC_VAR(name, varname) varname \ - __attribute__((section(".rodata.usb_desc_" STRINGIFY(name)))) + __keep __attribute__((section(".rodata.usb_desc_" STRINGIFY(name)))) #define USB_CONF_DESC(name) USB_CONF_DESC_VAR(name, CONCAT2(usb_desc_, name)) #define USB_IFACE_DESC(num) USB_CONF_DESC(CONCAT3(iface, num, _0iface)) #define USB_CUSTOM_DESC_VAR(i, name, varname) \ |