aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/gdbthread.h
diff options
context:
space:
mode:
authorBenjamin Drung <benjamin.drung@canonical.com>2024-11-18 11:38:25 +0100
committerJan Beulich <jbeulich@suse.com>2024-11-18 11:38:25 +0100
commitb0cc81e87087bb8a6b12dc1e4fd7f2591927977b (patch)
treec8d753b1e4c066c636cb50fe43992f84f62a314f /gdbserver/gdbthread.h
parent20d9fb448c375d5f521eaed8cfc0c49a44803bd1 (diff)
downloadgdb-master.zip
gdb-master.tar.gz
gdb-master.tar.bz2
ld: Support percent-encoded JSON in --package-metadataHEADmaster
Specifying the compiler flag `-Wl,--package-metadata=<JSON>` will not work in case the JSON contains a comma, because compiler drivers eat commas. Example: ``` $ echo "void main() { }" > test.c $ gcc '-Wl,--package-metadata={"type":"deb","os":"ubuntu"}' test.c /usr/bin/ld: cannot find "os":"ubuntu"}: No such file or directory collect2: error: ld returned 1 exit status ``` The quotation marks in the JSON value do not work well with shell nor make. Specifying the `--package-metadata` linker flag in a `LDFLAGS` environment variable might loose its quotation marks when it hits the final compiler call. So support percent-encoded and %[string] encoded JSON data in the `--package-metadata` linker flag. Percent-encoding is used because it is a standard, simple to implement, and does take too many additional characters. %[string] encoding is supported for having a more readable encoding. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32003 Bug-Ubutru: https://bugs.launchpad.net/bugs/2071468 Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Diffstat (limited to 'gdbserver/gdbthread.h')
0 files changed, 0 insertions, 0 deletions