Skip to content

Commit 3953e9c

Browse files
author
Filip Jagodzinski
committed
Add an MBED_USED attribute to main()
This attribute, attached to a function, means that code must be emitted for the function even if it appears that the function is not referenced. This is the case for combined "-Wl,--wrap,main" and "-flto" flags.
1 parent 732bd33 commit 3953e9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mbed.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,6 @@ using namespace mbed;
113113
using namespace std;
114114
#endif
115115

116+
MBED_USED int main(void);
117+
116118
#endif

0 commit comments

Comments
 (0)