Fix ICE from null character

Add checks for null bytes in the value strings for the export_name and link_section attributes, reporting an error if any are found, before calling with_c_str on them.

Fixes #16478
@kaseyc It doesn't look like you pushed this revision to the PR. Once you do, I think it's ready to go!