[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/32003] Specifying --package-metadata might not be possible and i
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile |
Date: |
Wed, 24 Jul 2024 06:50:13 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32003
--- Comment #18 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jan Beulich from comment #15)
> (In reply to Benjamin Drung from comment #6)
> > That linker testcase snippet is evaluated to:
> >
> > --package-metadata='{"foo":"bar"}'
> >
> > Passing that to a shell or makefile works, because the singe quotes protect
> > the JSON content inside. But this escaping protects this snippet from
> > evaluating only once. The problem is that the linker flag can be passed
> > around and evaluated multiple times. This will happen easily during Debian
> > package build, where debian/rules is a Makefile that calls the project build
> > system (that can use makefiles as well).
>
> That, however, is a problem of the build system. Passing around potentially
> quoted strings needs special care, to retain quotation. The issue isn't
> unique to Debian; see e.g. the Linux kernel's "escsq" and its uses (and how
> it further protects e.g. # and $$).
>
> Imo it's just the commas which are the main problem here, as -Wl,... in the
> compiler has - afaik - no way of escaping them.
'"' may be an issue for make as in comment #6.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, (continued)
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bdrung at posteo dot de, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bluca at debian dot org, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bdrung at posteo dot de, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bdrung at posteo dot de, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, jbeulich at suse dot com, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, jbeulich at suse dot com, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile,
hjl.tools at gmail dot com <=
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, sam at gentoo dot org, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, dilfridge at gentoo dot org, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bluca at debian dot org, 2024/07/25
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, doko at debian dot org, 2024/07/31