File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,7 @@ enum class ComdatType {
333333
334334#define WABT_SEGMENT_FLAG_STRINGS 0x1
335335#define WABT_SEGMENT_FLAG_TLS 0x2
336+ #define WASM_SEGMENT_FLAG_RETAIN 0x4
336337#define WABT_SEGMENT_FLAG_MAX 0xff
337338
338339enum class SymbolVisibility {
Original file line number Diff line number Diff line change @@ -2206,6 +2206,10 @@ Result BinaryReaderObjdump::PrintSegmentFlags(uint32_t flags) {
22062206 PrintDetails (" TLS" );
22072207 flags &= ~WABT_SEGMENT_FLAG_TLS;
22082208 }
2209+ if (flags & WASM_SEGMENT_FLAG_RETAIN) {
2210+ PrintDetails (" RETAIN" );
2211+ flags &= ~WASM_SEGMENT_FLAG_RETAIN;
2212+ }
22092213 if (flags != 0 ) {
22102214 PrintDetails (" unknown_flags=%#x" , flags);
22112215 }
Original file line number Diff line number Diff line change @@ -51,13 +51,16 @@ section("linking") {
5151 metadata_version[2]
5252
5353 section(LINKING_SEGMENT_INFO) {
54- count[2 ]
54+ count[3 ]
5555 str("data1")
5656 p2align[2]
5757 flags[1]
5858 str("data2")
5959 p2align[3]
6060 flags[10]
61+ str("data3")
62+ p2align[2]
63+ flags[4]
6164 }
6265
6366 section(LINKING_INIT_FUNCTIONS) {
@@ -153,9 +156,10 @@ Data[2]:
153156 - 000000a: 6261 72 bar
154157Custom:
155158 - name: "linking"
156- - segment info [count=2 ]
159+ - segment info [count=3 ]
157160 - 0: data1 p2align=2 [ STRINGS ]
158161 - 1: data2 p2align=3 [ TLS unknown_flags=0x8 ]
162+ - 2: data3 p2align=2 [ RETAIN ]
159163 - init functions [count=2]
160164 - 1: priority=5 <global_sym>
161165 - 0: priority=6 <func_sym>
You can’t perform that action at this time.
0 commit comments