Hi. As explained in the PR, this patch fixes all the duplicate DIE attribute issues seen in Darwin. This patch fixes real problems on Linux as well, but they're silently ignored by Linux's more permissive linker. I have enhanced check_die() to check for these duplicate attributes in the future. Comment #8 explains the add_location_or_const_value_attribute change and its testcase. Everything else is pretty obvious. Tested on x86_64 Linux and x86_64-apple-darwin*. OK for mainline?