Skip to content

Move exit override to retarget.cpp #908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2015
Merged

Move exit override to retarget.cpp #908

merged 1 commit into from
Feb 12, 2015

Conversation

adamgreen
Copy link
Contributor

I moved the exit handler from exit.c to retarget.cpp where the rest of
the standard C library retargetting routines are found. The exported
makefiles already explicitly link in retarget.o but not exit.o
When building with the GNU toolchain, it is safest to link in the
object file directly for retargetting routines so that GNU linker has
to use these versions of the routines.

Testing:
I have only tested this change with GCC_ARM. It should really be
tested with more toolchains before getting merged.

I moved the exit handler from exit.c to retarget.cpp where the rest of
the standard C library retargetting routines are found.  The exported
makefiles already explicitly link in retarget.o but not exit.o
When building with the GNU toolchain, it is safest to link in the
object file directly for retargetting routines so that GNU linker has
to use these versions of the routines.

Testing:
I have only tested this change with GCC_ARM. It should really be
tested with more toolchains before getting merged.
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 12, 2015

I'll test it with other toolchains

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 12, 2015

Tested with IAR and uVision, all green 🍏

0xc0170 added a commit that referenced this pull request Feb 12, 2015
@0xc0170 0xc0170 merged commit e03fb27 into ARMmbed:master Feb 12, 2015
@adamgreen
Copy link
Contributor Author

@0xc0170
Thanks for the test pass and merging!

@adamgreen adamgreen deleted the exitMoveToRetarget branch February 12, 2015 21:41
0xc0170 added a commit to 0xc0170/mbed-os that referenced this pull request Feb 16, 2015
0xc0170 added a commit that referenced this pull request Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants