{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/7372","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/7372/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/7372/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/7372/events","html_url":"https://github.com/ARMmbed/mbed-os/issues/7372","id":336937268,"node_id":"MDU6SXNzdWUzMzY5MzcyNjg=","number":7372,"title":"Wise1530 inflated binary size","user":{"login":"pan-","id":409941,"node_id":"MDQ6VXNlcjQwOTk0MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/409941?v=4","gravatar_id":"","url":"https://api.github.com/users/pan-","html_url":"https://github.com/pan-","followers_url":"https://api.github.com/users/pan-/followers","following_url":"https://api.github.com/users/pan-/following{/other_user}","gists_url":"https://api.github.com/users/pan-/gists{/gist_id}","starred_url":"https://api.github.com/users/pan-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pan-/subscriptions","organizations_url":"https://api.github.com/users/pan-/orgs","repos_url":"https://api.github.com/users/pan-/repos","events_url":"https://api.github.com/users/pan-/events{/privacy}","received_events_url":"https://api.github.com/users/pan-/received_events","type":"User","site_admin":false},"labels":[{"id":515345275,"node_id":"MDU6TGFiZWw1MTUzNDUyNzU=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/component:%20networking","name":"component: networking","color":"5319e7","default":false},{"id":427713129,"node_id":"MDU6TGFiZWw0Mjc3MTMxMjk=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/mirrored","name":"mirrored","color":"ededed","default":false},{"id":28847979,"node_id":"MDU6TGFiZWwyODg0Nzk3OQ==","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/type:%20bug","name":"type: bug","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-29T09:54:58Z","updated_at":"2018-07-04T06:50:56Z","closed_at":null,"author_association":"MEMBER","body":"### Description\r\n\r\nIntroduction of #7284 has inflated binaries generated of the MTB_ADV_WISE_1530. \r\n\r\nBefore (latest): \r\n\r\n```\r\n+------------------+-------+-------+------+\r\n| Module           | .text | .data | .bss |\r\n+------------------+-------+-------+------+\r\n| [fill]           |   107 |     0 |   21 |\r\n| [lib]\\c.a        | 24993 |  2472 |   89 |\r\n| [lib]\\gcc.a      |  3168 |     0 |    0 |\r\n| [lib]\\misc       |   252 |    16 |   28 |\r\n| main.o           |    31 |     0 |    0 |\r\n| mbed-os\\drivers  |   192 |     4 |  100 |\r\n| mbed-os\\features |   108 |     4 |   88 |\r\n| mbed-os\\hal      |  1653 |     4 |   68 |\r\n| mbed-os\\platform |  2844 |   264 |  221 |\r\n| mbed-os\\rtos     | 10438 |   168 | 6073 |\r\n| mbed-os\\targets  |  7328 |     4 |  428 |\r\n| Subtotals        | 51114 |  2936 | 7116 |\r\n+------------------+-------+-------+------+\r\nTotal Static RAM memory (data + bss): 10052 bytes\r\nTotal Flash memory (text + data): 54050 bytes\r\n\r\n```\r\n\r\nAfter #7284 : \r\n\r\n```\r\n+-----------------------+--------+-------+-------+\r\n| Module                |  .text | .data |  .bss |\r\n+-----------------------+--------+-------+-------+\r\n| [fill]                |    167 |     0 |    56 |\r\n| [lib]\\c.a             |  32659 |  2472 |    89 |\r\n| [lib]\\gcc.a           |   3168 |     0 |     0 |\r\n| [lib]\\misc            |    252 |    16 |    28 |\r\n| [lib]\\nosys.a         |     32 |     0 |     0 |\r\n| [lib]\\wiced_drivers.a | 413117 |   112 |  4433 |\r\n| main.o                |     31 |     0 |     0 |\r\n| mbed-os\\drivers       |    338 |     4 |   100 |\r\n| mbed-os\\events        |   1354 |     0 |     0 |\r\n| mbed-os\\features      |    274 |    12 |    48 |\r\n| mbed-os\\hal           |   1653 |     4 |    68 |\r\n| mbed-os\\platform      |   3519 |   260 |   217 |\r\n| mbed-os\\rtos          |  13445 |   168 |  6073 |\r\n| mbed-os\\targets       |   7328 |     4 |   428 |\r\n| Subtotals             | 477337 |  3052 | 11540 |\r\n+-----------------------+--------+-------+-------+\r\nTotal Static RAM memory (data + bss): 14592 bytes\r\nTotal Flash memory (text + data): 480389 bytes\r\n```\r\n\r\nThe code to get those results was compiled with GCC: \r\n\r\n```c++\r\n#include \"mbed.h\"\r\n\r\nint main() {\r\n    printf(\"Hello World!\\r\\n\");\r\n    return 0;\r\n}\r\n```\r\n\r\nThe cause seems to be a global Non POD object in the library added: \r\n\r\n```sh\r\narm-none-eabi-objdump.exe -t -r --section .init_array libwiced_drivers.a\r\n\r\nwiced_emac.o:     file format elf32-littlearm\r\n\r\nSYMBOL TABLE:\r\n00000000 l    d  .init_array    00000000 .init_array\r\n\r\n\r\nRELOCATION RECORDS FOR [.init_array]:\r\nOFFSET   TYPE              VALUE\r\n00000000 R_ARM_TARGET1     _GLOBAL__sub_I__ZN10WICED_EMACC2Ev\r\n```\r\n\r\n### Issue request type\r\n\r\n[ ] Question  \r\n[ ] Enhancement  \r\n[X] Bug  \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/402381119","html_url":"https://github.com/ARMmbed/mbed-os/issues/7372#issuecomment-402381119","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/7372","id":402381119,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjM4MTExOQ==","user":{"login":"mikaleppanen","id":13345641,"node_id":"MDQ6VXNlcjEzMzQ1NjQx","avatar_url":"https://avatars1.githubusercontent.com/u/13345641?v=4","gravatar_id":"","url":"https://api.github.com/users/mikaleppanen","html_url":"https://github.com/mikaleppanen","followers_url":"https://api.github.com/users/mikaleppanen/followers","following_url":"https://api.github.com/users/mikaleppanen/following{/other_user}","gists_url":"https://api.github.com/users/mikaleppanen/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaleppanen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaleppanen/subscriptions","organizations_url":"https://api.github.com/users/mikaleppanen/orgs","repos_url":"https://api.github.com/users/mikaleppanen/repos","events_url":"https://api.github.com/users/mikaleppanen/events{/privacy}","received_events_url":"https://api.github.com/users/mikaleppanen/received_events","type":"User","site_admin":false},"created_at":"2018-07-04T06:50:56Z","updated_at":"2018-07-04T06:50:56Z","author_association":"CONTRIBUTOR","body":"Fixed in: https://github.com/ARMmbed/mbed-os/pull/7413"}}
{"actor":{"display_login":"mikaleppanen"}}