This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [binutils-owner] Re: RFC: Displaying multibyte symbol names in readelf
- From: suzuki toshiya <mpsuzuki at hiroshima-u dot ac dot jp>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Hans-Peter Nilsson <hp at bitrange dot com>, binutils at sourceware dot org
- Date: Thu, 24 May 2012 10:02:27 +0900
- Subject: Re: [binutils-owner] Re: RFC: Displaying multibyte symbol names in readelf
- References: <87fwar9mke.fsf@Gift.fritz.box> <alpine.BSF.2.00.1205231359310.58208@dair.pair.com>
Excuse me, please let me ask a stupid question.
I guess some people want to receive raw constant data (e.g. hardwired
string data) instead of hexadecimalized constant data, so I believe
there is a requirement of such feature.
But, I'm not sure if the case that the character encoding in ELF binary
and that in current (terminal emulator's) locale are matched is common.
I'm afraid that the mismatched case, like, encoding in binary is UCS2,
UTF-16 or UTF-32 but the locale is UTF-8 would be popular (I'm not saying
it's the most popular case).
According to GCC manual:
-fwide-exec-charset=charset
Set the wide execution character set, used for wide string and
character constants. The default is UTF-32 or UTF-16, whichever
corresponds to the width of "wchar_t". As with -fexec-charset,
charset can be any encoding supported by the system's "iconv"
library routine; however, you will have problems with encodings
that do not fit exactly in "wchar_t".
I'm afraid that the constant wide character string in the binary executable
might be coded by UTF-32 or UTF-16 (I'm not saying it's the most popular case).
If you have already evaluated the proportions of such mismatched cases,
please let me know.
Regards,
mpsuzuki
Hans-Peter Nilsson wrote:
> On Wed, 23 May 2012, Nick Clifton wrote:
>> Does anyone have any objections or questions concerning adding such a
>> feature ?
>
> Test-cases, that it works for some common locale (possibly need
> the testing framework to check that it exists, else flag as
> UNTESTED) and as before for the "C" locale?
>
> brgds, H-P