{"action":"opened","issue":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/1098","labels_url":"https://api.github.com/repos/contiki-os/contiki/issues/1098/labels{/name}","comments_url":"https://api.github.com/repos/contiki-os/contiki/issues/1098/comments","events_url":"https://api.github.com/repos/contiki-os/contiki/issues/1098/events","html_url":"https://github.com/contiki-os/contiki/issues/1098","id":84114572,"number":1098,"title":"Question about a weird error while compiling","user":{"login":"areaarea","id":5545456,"avatar_url":"https://avatars.githubusercontent.com/u/5545456?v=3","gravatar_id":"","url":"https://api.github.com/users/areaarea","html_url":"https://github.com/areaarea","followers_url":"https://api.github.com/users/areaarea/followers","following_url":"https://api.github.com/users/areaarea/following{/other_user}","gists_url":"https://api.github.com/users/areaarea/gists{/gist_id}","starred_url":"https://api.github.com/users/areaarea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/areaarea/subscriptions","organizations_url":"https://api.github.com/users/areaarea/orgs","repos_url":"https://api.github.com/users/areaarea/repos","events_url":"https://api.github.com/users/areaarea/events{/privacy}","received_events_url":"https://api.github.com/users/areaarea/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-02T17:18:17Z","updated_at":"2015-06-02T17:18:17Z","closed_at":null,"body":"We are trying to incorporate an IPsec extension that we have found into our build.  \r\n\r\nwejem we did we got a linker error of this nature:\r\n\r\nLD        ipsec-example.elf\r\n/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':\r\nsbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'\r\ncollect2: error: ld returned 1 exit status\r\n\r\nFrom what I was able to find it seems that this _sbrk function is one of the system hooks in the compiler. This one specifically somehow related with memory allocation, i.e. malloc() implementation.\r\nTo make IPsec build, I just added a stub implementation of it like this one below, just to see if it is really called:\r\n\r\ncaddr_t\r\n_sbrk(int incr)\r\n{\r\n  printf(\"_sbrk: %d\\n\", incr );\r\n  return (caddr_t)0;\r\n}\r\n\r\nI don't see any outputs from it as well as I can't make the device to run any process, I can't even print out any string, it just shows initial data and then nothing:\r\n\r\nContiki-ipsec-alpha-2-2-g3de55d7                                         \r\nTI SmartRF06 + cc2538EM  \r\n Net: sicslowpan                   \r\n MAC: CSMA                                           \r\n RDC: ContikiMAC\r\n                    \r\nI have don't have a lot of experience at this compiler/linker levels (spoiled by modern tools.)  Any guidance would be helpful.\r\n\r\nAdam"}}