File tree 3 files changed +11
-2
lines changed 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,7 @@ enum class ComdatType {
333
333
334
334
#define WABT_SEGMENT_FLAG_STRINGS 0x1
335
335
#define WABT_SEGMENT_FLAG_TLS 0x2
336
+ #define WASM_SEGMENT_FLAG_RETAIN 0x4
336
337
#define WABT_SEGMENT_FLAG_MAX 0xff
337
338
338
339
enum class SymbolVisibility {
Original file line number Diff line number Diff line change @@ -2206,6 +2206,10 @@ Result BinaryReaderObjdump::PrintSegmentFlags(uint32_t flags) {
2206
2206
PrintDetails (" TLS" );
2207
2207
flags &= ~WABT_SEGMENT_FLAG_TLS;
2208
2208
}
2209
+ if (flags & WASM_SEGMENT_FLAG_RETAIN) {
2210
+ PrintDetails (" RETAIN" );
2211
+ flags &= ~WASM_SEGMENT_FLAG_RETAIN;
2212
+ }
2209
2213
if (flags != 0 ) {
2210
2214
PrintDetails (" unknown_flags=%#x" , flags);
2211
2215
}
Original file line number Diff line number Diff line change @@ -51,13 +51,16 @@ section("linking") {
51
51
metadata_version[2]
52
52
53
53
section(LINKING_SEGMENT_INFO) {
54
- count[2 ]
54
+ count[3 ]
55
55
str("data1")
56
56
p2align[2]
57
57
flags[1]
58
58
str("data2")
59
59
p2align[3]
60
60
flags[10]
61
+ str("data3")
62
+ p2align[2]
63
+ flags[4]
61
64
}
62
65
63
66
section(LINKING_INIT_FUNCTIONS) {
@@ -153,9 +156,10 @@ Data[2]:
153
156
- 000000a: 6261 72 bar
154
157
Custom:
155
158
- name: "linking"
156
- - segment info [count=2 ]
159
+ - segment info [count=3 ]
157
160
- 0: data1 p2align=2 [ STRINGS ]
158
161
- 1: data2 p2align=3 [ TLS unknown_flags=0x8 ]
162
+ - 2: data3 p2align=2 [ RETAIN ]
159
163
- init functions [count=2]
160
164
- 1: priority=5 <global_sym>
161
165
- 0: priority=6 <func_sym>
You can’t perform that action at this time.
0 commit comments