gas: Mark weak functions as external in DWARF S_IS_EXTERNAL only tests BSF_GLOBAL, which is cleared for weak symbols. Subprogram DIEs generated for weak functions therefore either omit DW_AT_external or set it to false, causing GDB to classify them as static. Check S_IS_WEAK alongside S_IS_EXTERNAL when emitting subprogram DIEs. Signed-off-by: Longjun Luo <luolongjuna@gmail.com>