Fix symbol demangling for GCC 5, as reported at: https://github.com/google/glog/issues/14 Patch from: https://github.com/google/glog/pull/50 From b1639e3014996fbc7635870e013559c54e7e3b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mart=C3=ADnez=20Moreno?= Date: Thu, 13 Aug 2015 09:31:26 -0700 Subject: [PATCH] Fix ABI demangling for the GCC 5.x case. When glog is compiled with gcc-5.2 in cxx11 ABI mode, it barfs about unmangled symbols. This patches it getting inspiration from binutils and demangle.cc itself, although it may be totally wrong or maybe have to use ParseAbiTag in more places. I haven't read the spec for the symbols, though. This patch makes the demangle unit test pass correctly. --- src/demangle.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/demangle.cc b/src/demangle.cc index e858181..0f0c831 100644 --- a/src/demangle.cc +++ b/src/demangle.cc @@ -439,6 +439,7 @@ static bool ParseExprPrimary(State *state); static bool ParseLocalName(State *state); static bool ParseDiscriminator(State *state); static bool ParseSubstitution(State *state); +static bool ParseAbiTag(State *state); // Implementation note: the following code is a straightforward // translation of the Itanium C++ ABI defined in BNF with a couple of @@ -567,6 +568,8 @@ static bool ParseNestedName(State *state) { static bool ParsePrefix(State *state) { bool has_something = false; while (true) { + if (ParseAbiTag(state)) + continue; MaybeAppendSeparator(state); if (ParseTemplateParam(state) || ParseSubstitution(state) || @@ -585,6 +588,22 @@ static bool ParsePrefix(State *state) { return true; } +// ::= B +static bool ParseAbiTag(State *state) { + State copy = *state; + + Append(state, "[", 1); + if (ParseOneCharToken(state, 'B') && + ParseSourceName(state)) + { + Append(state, "]", 1); + return true; + } + + *state = copy; + return false; +} + // ::= // ::= // ::= a>
100'>2020-11-16
AgeCommit message (Expand)Author
2020-06-17.guix-channel: Add primary URL....* .guix-channel: Add 'url'. Ludovic Courtès
2020-06-16.guix-channel: Add 'keyring-reference'....* .guix-channel: Add 'keyring-reference'. Ludovic Courtès
gnu: bootloader: Support chain loading to an EFI bootloader....* gnu/bootloader.scm (efi-bootloader-profile): New function. (efi-bootloader-chain): New function. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Stefan
2020-06-08bootloader: Extend `<menu-entry>' for multiboot....* gnu/bootloader.scm (<menu-entry>)[multiboot-kernel,multiboot-arguments, multiboot-modules]: New fields. [linux,initrd]: Add default value '#f'. (menu-entry->sexp, sexp->menu-entry): Support multiboot entry. * doc/guix.texi (Bootloader Configuration): Document them. Jan (janneke) Nieuwenhuizen
2020-05-29bootloader: Add 'disk-image-installer'....* gnu/bootloader.scm (<bootloader>)[disk-image-installer]: New field, (bootloader-disk-image-installer): export it. * gnu/bootloader/grub.scm (install-grub-disk-image): New procedure ... (grub-bootloader): ... used as "disk-image-installer" here. (grub-efi-bootloader): set "disk-image-installer" to #f. * gnu/system/image.scm (root-partition?, find-root-partition): Move to "Helpers" section. (root-partition-index): New procedure. (system-disk-image): Honor disk-image-installer, and use it to install the bootloader directly on the disk-image, if supported. Mathieu Othacehe
2019-08-30system: Add 'bootloader-menu-entries' field to <boot-parameters>....This allows us to keep track of the extra menu entries specified in the OS configuration. * gnu/system.scm (<boot-parameters>)[bootloader-menu-entries]: New field. (read-boot-parameters): Initialize it. (operating-system-boot-parameters): Likewise. (operating-system-boot-parameters-file): Serialize it. * gnu/bootloader.scm (menu-entry->sexp, sexp->menu-entry): New procedures. Ludovic Courtès
2019-08-30bootloader: Fix comment about 'menu-entries'....* gnu/bootloader.scm (<bootloader-configuration>)[menu-entries]: Fix margin comment. Ludovic Courtès