| Summary: | gcc -static compilation has exit() call _stdio_term which is null | ||
|---|---|---|---|
| Product: | uClibc | Reporter: | paul.barbieri |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | uclibc-cvs |
| Priority: | P5 | ||
| Version: | 0.9.30.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
Workaround installed as 82f8d0bce10403deab704871e638edc24e7933ee Will be fixed properly with gcc-4.7.x, patch for 4.[56] were sent. |
I have applied the gcc PR32219 patches which use not_null_ptr() when testing existence of _stdio_init, _locale_init, __errno_location, and __h_errno_location. This gets me past __uClibc_init but now I die in _atexit.c: exit() routine which calls _stdio_term. I have put the same not_null_ptr() functionality in and the problem goes away but I did not see any changes in the current upstream to deal with this same issue. My test program is foo.c compiled and linked as shown below: int main(int argc, char **argv) { return 0; } gcc -static -o foo foo.c