Skip to content

Commit 29f4434

Browse files
Enable string merging in the exceptiontext section
1 parent 1bced41 commit 29f4434

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

patches/gcc4.8/gcc-exception-what-to-pmem.patch

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ index 23bd9b9..93e00ed 100644
66
#include <initializer_list>
77
#endif
88

9-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
9+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
1010
+
1111
namespace std _GLIBCXX_VISIBILITY(default)
1212
{
@@ -107,7 +107,7 @@ index 317eb74..17a95ca 100644
107107

108108
#pragma GCC system_header
109109

110-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
110+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
111111
+
112112
#include <bits/cxxabi_forced.h>
113113

@@ -296,7 +296,7 @@ index 0882fe6..078f50d 100644
296296
#ifndef _VECTOR_TCC
297297
#define _VECTOR_TCC 1
298298

299-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
299+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
300300
+
301301
namespace std _GLIBCXX_VISIBILITY(default)
302302
{
@@ -399,7 +399,7 @@ index 4891114..1e0a8be 100644
399399

400400
#include "new"
401401

402-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
402+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
403403
+
404404
std::bad_alloc::~bad_alloc() _GLIBCXX_USE_NOEXCEPT { }
405405

@@ -417,7 +417,7 @@ index ad72084..ea0105a 100644
417417

418418
#include <typeinfo>
419419

420-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
420+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
421421
+
422422
namespace std {
423423

@@ -439,7 +439,7 @@ index 73cbf27..09fa5e8 100644
439439

440440
#include <typeinfo>
441441

442-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
442+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
443443
+
444444
namespace std {
445445

@@ -461,7 +461,7 @@ index 4fd8711..4f13761 100644
461461
#include "exception"
462462
#include <cxxabi.h>
463463

464-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
464+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
465465
+
466466
std::exception::~exception() _GLIBCXX_USE_NOEXCEPT { }
467467

@@ -488,7 +488,7 @@ index 8d81f60..3186719 100644
488488

489489
#include <functional>
490490

491-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
491+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
492492
+
493493
namespace std _GLIBCXX_VISIBILITY(default)
494494
{
@@ -510,7 +510,7 @@ index ca5714a..bb7f1f0 100644
510510

511511
#include <memory>
512512

513-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
513+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
514514
+
515515
namespace std _GLIBCXX_VISIBILITY(default)
516516
{
@@ -532,7 +532,7 @@ index 69c6e27..5dbce77 100644
532532
#include <initializer_list>
533533
#endif
534534

535-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
535+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
536536
+
537537
namespace std _GLIBCXX_VISIBILITY(default)
538538
{
@@ -561,7 +561,7 @@ index 89c5ef7..5b316c7 100644
561561
#ifndef _DEQUE_TCC
562562
#define _DEQUE_TCC 1
563563

564-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
564+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
565565
+
566566
namespace std _GLIBCXX_VISIBILITY(default)
567567
{
@@ -601,7 +601,7 @@ index 6f9b843..3276a87 100644
601601
#ifndef _HASHTABLE_POLICY_H
602602
#define _HASHTABLE_POLICY_H 1
603603

604-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
604+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
605605
+
606606
namespace std _GLIBCXX_VISIBILITY(default)
607607
{
@@ -639,7 +639,7 @@ index 422a98a..0d869b7 100644
639639
#include <initializer_list>
640640
#endif
641641

642-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
642+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
643643
+
644644
namespace std _GLIBCXX_VISIBILITY(default)
645645
{
@@ -670,7 +670,7 @@ index 596760c..dbfe8c6 100644
670670
#include <initializer_list>
671671
#endif
672672

673-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
673+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
674674
+
675675
namespace std _GLIBCXX_VISIBILITY(default)
676676
{
@@ -699,7 +699,7 @@ index d05e4b9..39e5721 100644
699699
#include <tuple>
700700
#endif
701701

702-
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext"))) = (s); &__c[0];}))
702+
+#define __EXCSTR(s) (__extension__({static const char __c[] __attribute__((section(".irom.exceptiontext,\"MS\",@progbits,1#"))) = (s); &__c[0];}))
703703
+
704704
namespace std _GLIBCXX_VISIBILITY(default)
705705
{

0 commit comments

Comments
 (0)