annotate lld/MachO/OutputSegment.cpp @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 0572611fdcc8
children 5f17cb93ff66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 //===- OutputSegment.cpp --------------------------------------------------===//
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 //
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 //
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 #include "OutputSegment.h"
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
10 #include "ConcatOutputSection.h"
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 #include "InputSection.h"
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 #include "SyntheticSections.h"
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 #include "lld/Common/ErrorHandler.h"
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 #include "lld/Common/Memory.h"
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
16 #include "llvm/ADT/StringSwitch.h"
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 #include "llvm/BinaryFormat/MachO.h"
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 using namespace llvm;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 using namespace llvm::MachO;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 using namespace lld;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 using namespace lld::macho;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 static uint32_t initProt(StringRef name) {
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
25 auto it = find_if(
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
26 config->segmentProtections,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
27 [&](const SegmentProtection &segprot) { return segprot.name == name; });
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
28 if (it != config->segmentProtections.end())
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
29 return it->initProt;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
30
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 if (name == segment_names::text)
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 return VM_PROT_READ | VM_PROT_EXECUTE;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 if (name == segment_names::pageZero)
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 return 0;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 if (name == segment_names::linkEdit)
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 return VM_PROT_READ;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 return VM_PROT_READ | VM_PROT_WRITE;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 static uint32_t maxProt(StringRef name) {
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
41 assert(config->arch() != AK_i386 &&
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
42 "TODO: i386 has different maxProt requirements");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
43 return initProt(name);
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 size_t OutputSegment::numNonHiddenSections() const {
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 size_t count = 0;
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
48 for (const OutputSection *osec : sections)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
49 count += (!osec->isHidden() ? 1 : 0);
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 return count;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
53 void OutputSegment::addOutputSection(OutputSection *osec) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
54 inputOrder = std::min(inputOrder, osec->inputOrder);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
55
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
56 osec->parent = this;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
57 sections.push_back(osec);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
58
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
59 for (const SectionAlign &sectAlign : config->sectionAlignments)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
60 if (sectAlign.segName == name && sectAlign.sectName == osec->name)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
61 osec->align = sectAlign.align;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
64 template <typename T, typename F> static auto compareByOrder(F ord) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
65 return [=](T a, T b) { return ord(a) < ord(b); };
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
68 static int segmentOrder(OutputSegment *seg) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
69 return StringSwitch<int>(seg->name)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
70 .Case(segment_names::pageZero, -4)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
71 .Case(segment_names::text, -3)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
72 .Case(segment_names::dataConst, -2)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
73 .Case(segment_names::data, -1)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
74 .Case(segment_names::llvm, std::numeric_limits<int>::max() - 1)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
75 // Make sure __LINKEDIT is the last segment (i.e. all its hidden
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
76 // sections must be ordered after other sections).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
77 .Case(segment_names::linkEdit, std::numeric_limits<int>::max())
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
78 .Default(seg->inputOrder);
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
81 static int sectionOrder(OutputSection *osec) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
82 StringRef segname = osec->parent->name;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
83 // Sections are uniquely identified by their segment + section name.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
84 if (segname == segment_names::text) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
85 return StringSwitch<int>(osec->name)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
86 .Case(section_names::header, -4)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
87 .Case(section_names::text, -3)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
88 .Case(section_names::stubs, -2)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
89 .Case(section_names::stubHelper, -1)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
90 .Case(section_names::unwindInfo, std::numeric_limits<int>::max() - 1)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
91 .Case(section_names::ehFrame, std::numeric_limits<int>::max())
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
92 .Default(osec->inputOrder);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
93 } else if (segname == segment_names::data ||
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
94 segname == segment_names::dataConst) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
95 // For each thread spawned, dyld will initialize its TLVs by copying the
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
96 // address range from the start of the first thread-local data section to
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
97 // the end of the last one. We therefore arrange these sections contiguously
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
98 // to minimize the amount of memory used. Additionally, since zerofill
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
99 // sections must be at the end of their segments, and since TLV data
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
100 // sections can be zerofills, we end up putting all TLV data sections at the
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
101 // end of the segment.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
102 switch (sectionType(osec->flags)) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
103 case S_THREAD_LOCAL_REGULAR:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
104 return std::numeric_limits<int>::max() - 2;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
105 case S_THREAD_LOCAL_ZEROFILL:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
106 return std::numeric_limits<int>::max() - 1;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
107 case S_ZEROFILL:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
108 return std::numeric_limits<int>::max();
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
109 default:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
110 return StringSwitch<int>(osec->name)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
111 .Case(section_names::got, -3)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
112 .Case(section_names::lazySymbolPtr, -2)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
113 .Case(section_names::const_, -1)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
114 .Default(osec->inputOrder);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
115 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
116 } else if (segname == segment_names::linkEdit) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
117 return StringSwitch<int>(osec->name)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
118 .Case(section_names::rebase, -9)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
119 .Case(section_names::binding, -8)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
120 .Case(section_names::weakBinding, -7)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
121 .Case(section_names::lazyBinding, -6)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
122 .Case(section_names::export_, -5)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
123 .Case(section_names::functionStarts, -4)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
124 .Case(section_names::symbolTable, -3)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
125 .Case(section_names::indirectSymbolTable, -2)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
126 .Case(section_names::stringTable, -1)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
127 .Case(section_names::codeSignature, std::numeric_limits<int>::max())
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
128 .Default(osec->inputOrder);
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 }
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
130 // ZeroFill sections must always be the at the end of their segments,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
131 // otherwise subsequent sections may get overwritten with zeroes at runtime.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
132 if (sectionType(osec->flags) == S_ZEROFILL)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
133 return std::numeric_limits<int>::max();
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
134 return osec->inputOrder;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
137 void OutputSegment::sortOutputSections() {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
138 llvm::sort(sections, compareByOrder<OutputSection *>(sectionOrder));
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
139 }
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
141 void macho::sortOutputSegments() {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
142 llvm::sort(outputSegments, compareByOrder<OutputSegment *>(segmentOrder));
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
145 static DenseMap<StringRef, OutputSegment *> nameToOutputSegment;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
146 std::vector<OutputSegment *> macho::outputSegments;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
147
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 OutputSegment *macho::getOrCreateOutputSegment(StringRef name) {
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 OutputSegment *&segRef = nameToOutputSegment[name];
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
150 if (segRef)
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 return segRef;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 segRef = make<OutputSegment>();
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 segRef->name = name;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 segRef->maxProt = maxProt(name);
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 segRef->initProt = initProt(name);
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 outputSegments.push_back(segRef);
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 return segRef;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 }