forked from picolibc/picolibc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arm/crt0.c: Print register dumps without using printf
Users optimizing for size might well want to leave printf out of their link completely, if their I/O needs are not complicated. But if they're using the fault reporting functions in arm/crt0.c, then they get printf pulled in anyway by `arm_fault()`. This patch reworks `arm_fault()` to use only `fputs` and `putchar`, and to do its hex number formatting by hand in as little code as possible. (I considered using `utoa` for the number formatting, but it has the wrong feature set: here we don't need its support for arbitrary number bases, and on the other hand, we do want fixed-width hex numbers instead of minimal-width.)
- Loading branch information
1 parent
58d6157
commit 9adab07
Showing
1 changed file
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters