[PATCH 1/2] ld: Add --pdb option
Alan Modra
amodra@gmail.com
Wed Oct 5 04:20:47 GMT 2022
On Mon, Oct 03, 2022 at 02:43:12AM +0100, Mark Harmstone wrote:
> @@ -955,6 +960,13 @@ gld${EMULATION_NAME}_handle_option (int optc)
> if (strcmp (optarg, "none"))
> emit_build_id = xstrdup (optarg);
> break;
> + case OPTION_PDB:
> + if (emit_build_id == NULL)
> + emit_build_id = xstrdup (DEFAULT_BUILD_ID_STYLE);
> + pdb = 1;
> + if (optarg)
> + pdb_name = xstrdup (optarg);
> + break;
This will result in "--emit-build-id=none --pdb" enabling build-id
while "--pdb --emit-build-id=none" will disable build-id. Is that
what you want?
If the intent is to always force build-id on then you should do so in
after_parse instead. Otherwise both patches look OK to me.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list