Fix mini_debug_info stripping when no symbols should be kept.
If there are no symbols to keep (i.e. all function symbols are also in the dynsym table), then the "${outfile}.keep_symbols" file has size 0. When objcopy parses a --keep-symbols file, it has a special case for 0-sized files where it silently fails (exits with status 1, no error message). On the other hand, objcopy is happy with a file containing no symbols, as long as there is some whitespace or a comment. Avoid the special case by appending a newline to keep_symbols. Bug: b/62815515 Bug: b/77242617 Test: manual Change-Id: I90fd3258426176dc18aa5a8c19389c55fe6329c7 (cherry picked from commit afefacf1)
Loading
Please register or sign in to comment