github.com/zxy12/go_duplicate_112_new@v0.0.0-20200807091221-747231827200/src/cmd/link/internal/arm64/asm.go (about) 1 // Inferno utils/5l/asm.c 2 // https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c 3 // 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 6 // Portions Copyright © 1997-1999 Vita Nuova Limited 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com) 8 // Portions Copyright © 2004,2006 Bruce Ellis 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others 11 // Portions Copyright © 2009 The Go Authors. All rights reserved. 12 // 13 // Permission is hereby granted, free of charge, to any person obtaining a copy 14 // of this software and associated documentation files (the "Software"), to deal 15 // in the Software without restriction, including without limitation the rights 16 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 // copies of the Software, and to permit persons to whom the Software is 18 // furnished to do so, subject to the following conditions: 19 // 20 // The above copyright notice and this permission notice shall be included in 21 // all copies or substantial portions of the Software. 22 // 23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 // THE SOFTWARE. 30 31 package arm64 32 33 import ( 34 "cmd/internal/objabi" 35 "cmd/internal/sys" 36 "cmd/link/internal/ld" 37 "cmd/link/internal/sym" 38 "debug/elf" 39 "encoding/binary" 40 "fmt" 41 "log" 42 ) 43 44 func gentext(ctxt *ld.Link) { 45 if !ctxt.DynlinkingGo() { 46 return 47 } 48 addmoduledata := ctxt.Syms.Lookup("runtime.addmoduledata", 0) 49 if addmoduledata.Type == sym.STEXT && ctxt.BuildMode != ld.BuildModePlugin { 50 // we're linking a module containing the runtime -> no need for 51 // an init function 52 return 53 } 54 addmoduledata.Attr |= sym.AttrReachable 55 initfunc := ctxt.Syms.Lookup("go.link.addmoduledata", 0) 56 initfunc.Type = sym.STEXT 57 initfunc.Attr |= sym.AttrLocal 58 initfunc.Attr |= sym.AttrReachable 59 o := func(op uint32) { 60 initfunc.AddUint32(ctxt.Arch, op) 61 } 62 // 0000000000000000 <local.dso_init>: 63 // 0: 90000000 adrp x0, 0 <runtime.firstmoduledata> 64 // 0: R_AARCH64_ADR_PREL_PG_HI21 local.moduledata 65 // 4: 91000000 add x0, x0, #0x0 66 // 4: R_AARCH64_ADD_ABS_LO12_NC local.moduledata 67 o(0x90000000) 68 o(0x91000000) 69 rel := initfunc.AddRel() 70 rel.Off = 0 71 rel.Siz = 8 72 rel.Sym = ctxt.Moduledata 73 rel.Type = objabi.R_ADDRARM64 74 75 // 8: 14000000 b 0 <runtime.addmoduledata> 76 // 8: R_AARCH64_CALL26 runtime.addmoduledata 77 o(0x14000000) 78 rel = initfunc.AddRel() 79 rel.Off = 8 80 rel.Siz = 4 81 rel.Sym = ctxt.Syms.Lookup("runtime.addmoduledata", 0) 82 rel.Type = objabi.R_CALLARM64 // Really should be R_AARCH64_JUMP26 but doesn't seem to make any difference 83 84 if ctxt.BuildMode == ld.BuildModePlugin { 85 ctxt.Textp = append(ctxt.Textp, addmoduledata) 86 } 87 ctxt.Textp = append(ctxt.Textp, initfunc) 88 initarray_entry := ctxt.Syms.Lookup("go.link.addmoduledatainit", 0) 89 initarray_entry.Attr |= sym.AttrReachable 90 initarray_entry.Attr |= sym.AttrLocal 91 initarray_entry.Type = sym.SINITARR 92 initarray_entry.AddAddr(ctxt.Arch, initfunc) 93 } 94 95 // adddynrel implements just enough to support external linking to 96 // the system libc functions used by the runtime. 97 func adddynrel(ctxt *ld.Link, s *sym.Symbol, r *sym.Reloc) bool { 98 targ := r.Sym 99 100 switch r.Type { 101 case objabi.R_CALL, 102 objabi.R_PCREL, 103 objabi.R_CALLARM64: 104 if targ.Type != sym.SDYNIMPORT { 105 // nothing to do, the relocation will be laid out in reloc 106 return true 107 } 108 if ctxt.LinkMode == ld.LinkExternal { 109 // External linker will do this relocation. 110 return true 111 } 112 } 113 log.Fatalf("adddynrel not implemented for relocation type %d (%s)", r.Type, sym.RelocName(ctxt.Arch, r.Type)) 114 return false 115 } 116 117 func elfreloc1(ctxt *ld.Link, r *sym.Reloc, sectoff int64) bool { 118 ctxt.Out.Write64(uint64(sectoff)) 119 120 elfsym := r.Xsym.ElfsymForReloc() 121 switch r.Type { 122 default: 123 return false 124 case objabi.R_ADDR: 125 switch r.Siz { 126 case 4: 127 ctxt.Out.Write64(uint64(elf.R_AARCH64_ABS32) | uint64(elfsym)<<32) 128 case 8: 129 ctxt.Out.Write64(uint64(elf.R_AARCH64_ABS64) | uint64(elfsym)<<32) 130 default: 131 return false 132 } 133 case objabi.R_ADDRARM64: 134 // two relocations: R_AARCH64_ADR_PREL_PG_HI21 and R_AARCH64_ADD_ABS_LO12_NC 135 ctxt.Out.Write64(uint64(elf.R_AARCH64_ADR_PREL_PG_HI21) | uint64(elfsym)<<32) 136 ctxt.Out.Write64(uint64(r.Xadd)) 137 ctxt.Out.Write64(uint64(sectoff + 4)) 138 ctxt.Out.Write64(uint64(elf.R_AARCH64_ADD_ABS_LO12_NC) | uint64(elfsym)<<32) 139 case objabi.R_ARM64_TLS_LE: 140 ctxt.Out.Write64(uint64(elf.R_AARCH64_TLSLE_MOVW_TPREL_G0) | uint64(elfsym)<<32) 141 case objabi.R_ARM64_TLS_IE: 142 ctxt.Out.Write64(uint64(elf.R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21) | uint64(elfsym)<<32) 143 ctxt.Out.Write64(uint64(r.Xadd)) 144 ctxt.Out.Write64(uint64(sectoff + 4)) 145 ctxt.Out.Write64(uint64(elf.R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC) | uint64(elfsym)<<32) 146 case objabi.R_ARM64_GOTPCREL: 147 ctxt.Out.Write64(uint64(elf.R_AARCH64_ADR_GOT_PAGE) | uint64(elfsym)<<32) 148 ctxt.Out.Write64(uint64(r.Xadd)) 149 ctxt.Out.Write64(uint64(sectoff + 4)) 150 ctxt.Out.Write64(uint64(elf.R_AARCH64_LD64_GOT_LO12_NC) | uint64(elfsym)<<32) 151 case objabi.R_CALLARM64: 152 if r.Siz != 4 { 153 return false 154 } 155 ctxt.Out.Write64(uint64(elf.R_AARCH64_CALL26) | uint64(elfsym)<<32) 156 157 } 158 ctxt.Out.Write64(uint64(r.Xadd)) 159 160 return true 161 } 162 163 func elfsetupplt(ctxt *ld.Link) { 164 // TODO(aram) 165 return 166 } 167 168 func machoreloc1(arch *sys.Arch, out *ld.OutBuf, s *sym.Symbol, r *sym.Reloc, sectoff int64) bool { 169 var v uint32 170 171 rs := r.Xsym 172 173 if rs.Type == sym.SHOSTOBJ || r.Type == objabi.R_CALLARM64 || r.Type == objabi.R_ADDRARM64 { 174 if rs.Dynid < 0 { 175 ld.Errorf(s, "reloc %d (%s) to non-macho symbol %s type=%d (%s)", r.Type, sym.RelocName(arch, r.Type), rs.Name, rs.Type, rs.Type) 176 return false 177 } 178 179 v = uint32(rs.Dynid) 180 v |= 1 << 27 // external relocation 181 } else { 182 v = uint32(rs.Sect.Extnum) 183 if v == 0 { 184 ld.Errorf(s, "reloc %d (%s) to symbol %s in non-macho section %s type=%d (%s)", r.Type, sym.RelocName(arch, r.Type), rs.Name, rs.Sect.Name, rs.Type, rs.Type) 185 return false 186 } 187 } 188 189 switch r.Type { 190 default: 191 return false 192 case objabi.R_ADDR: 193 v |= ld.MACHO_ARM64_RELOC_UNSIGNED << 28 194 case objabi.R_CALLARM64: 195 if r.Xadd != 0 { 196 ld.Errorf(s, "ld64 doesn't allow BR26 reloc with non-zero addend: %s+%d", rs.Name, r.Xadd) 197 } 198 199 v |= 1 << 24 // pc-relative bit 200 v |= ld.MACHO_ARM64_RELOC_BRANCH26 << 28 201 case objabi.R_ADDRARM64: 202 r.Siz = 4 203 // Two relocation entries: MACHO_ARM64_RELOC_PAGEOFF12 MACHO_ARM64_RELOC_PAGE21 204 // if r.Xadd is non-zero, add two MACHO_ARM64_RELOC_ADDEND. 205 if r.Xadd != 0 { 206 out.Write32(uint32(sectoff + 4)) 207 out.Write32((ld.MACHO_ARM64_RELOC_ADDEND << 28) | (2 << 25) | uint32(r.Xadd&0xffffff)) 208 } 209 out.Write32(uint32(sectoff + 4)) 210 out.Write32(v | (ld.MACHO_ARM64_RELOC_PAGEOFF12 << 28) | (2 << 25)) 211 if r.Xadd != 0 { 212 out.Write32(uint32(sectoff)) 213 out.Write32((ld.MACHO_ARM64_RELOC_ADDEND << 28) | (2 << 25) | uint32(r.Xadd&0xffffff)) 214 } 215 v |= 1 << 24 // pc-relative bit 216 v |= ld.MACHO_ARM64_RELOC_PAGE21 << 28 217 } 218 219 switch r.Siz { 220 default: 221 return false 222 case 1: 223 v |= 0 << 25 224 case 2: 225 v |= 1 << 25 226 case 4: 227 v |= 2 << 25 228 case 8: 229 v |= 3 << 25 230 } 231 232 out.Write32(uint32(sectoff)) 233 out.Write32(v) 234 return true 235 } 236 237 func archreloc(ctxt *ld.Link, r *sym.Reloc, s *sym.Symbol, val int64) (int64, bool) { 238 if ctxt.LinkMode == ld.LinkExternal { 239 switch r.Type { 240 default: 241 return val, false 242 case objabi.R_ARM64_GOTPCREL: 243 var o1, o2 uint32 244 if ctxt.Arch.ByteOrder == binary.BigEndian { 245 o1 = uint32(val >> 32) 246 o2 = uint32(val) 247 } else { 248 o1 = uint32(val) 249 o2 = uint32(val >> 32) 250 } 251 // Any relocation against a function symbol is redirected to 252 // be against a local symbol instead (see putelfsym in 253 // symtab.go) but unfortunately the system linker was buggy 254 // when confronted with a R_AARCH64_ADR_GOT_PAGE relocation 255 // against a local symbol until May 2015 256 // (https://sourceware.org/bugzilla/show_bug.cgi?id=18270). So 257 // we convert the adrp; ld64 + R_ARM64_GOTPCREL into adrp; 258 // add + R_ADDRARM64. 259 if !(r.Sym.IsFileLocal() || r.Sym.Attr.VisibilityHidden() || r.Sym.Attr.Local()) && r.Sym.Type == sym.STEXT && ctxt.DynlinkingGo() { 260 if o2&0xffc00000 != 0xf9400000 { 261 ld.Errorf(s, "R_ARM64_GOTPCREL against unexpected instruction %x", o2) 262 } 263 o2 = 0x91000000 | (o2 & 0x000003ff) 264 r.Type = objabi.R_ADDRARM64 265 } 266 if ctxt.Arch.ByteOrder == binary.BigEndian { 267 val = int64(o1)<<32 | int64(o2) 268 } else { 269 val = int64(o2)<<32 | int64(o1) 270 } 271 fallthrough 272 case objabi.R_ADDRARM64: 273 r.Done = false 274 275 // set up addend for eventual relocation via outer symbol. 276 rs := r.Sym 277 r.Xadd = r.Add 278 for rs.Outer != nil { 279 r.Xadd += ld.Symaddr(rs) - ld.Symaddr(rs.Outer) 280 rs = rs.Outer 281 } 282 283 if rs.Type != sym.SHOSTOBJ && rs.Type != sym.SDYNIMPORT && rs.Sect == nil { 284 ld.Errorf(s, "missing section for %s", rs.Name) 285 } 286 r.Xsym = rs 287 288 // Note: ld64 currently has a bug that any non-zero addend for BR26 relocation 289 // will make the linking fail because it thinks the code is not PIC even though 290 // the BR26 relocation should be fully resolved at link time. 291 // That is the reason why the next if block is disabled. When the bug in ld64 292 // is fixed, we can enable this block and also enable duff's device in cmd/7g. 293 if false && ctxt.HeadType == objabi.Hdarwin { 294 var o0, o1 uint32 295 296 if ctxt.Arch.ByteOrder == binary.BigEndian { 297 o0 = uint32(val >> 32) 298 o1 = uint32(val) 299 } else { 300 o0 = uint32(val) 301 o1 = uint32(val >> 32) 302 } 303 // Mach-O wants the addend to be encoded in the instruction 304 // Note that although Mach-O supports ARM64_RELOC_ADDEND, it 305 // can only encode 24-bit of signed addend, but the instructions 306 // supports 33-bit of signed addend, so we always encode the 307 // addend in place. 308 o0 |= (uint32((r.Xadd>>12)&3) << 29) | (uint32((r.Xadd>>12>>2)&0x7ffff) << 5) 309 o1 |= uint32(r.Xadd&0xfff) << 10 310 r.Xadd = 0 311 312 // when laid out, the instruction order must always be o1, o2. 313 if ctxt.Arch.ByteOrder == binary.BigEndian { 314 val = int64(o0)<<32 | int64(o1) 315 } else { 316 val = int64(o1)<<32 | int64(o0) 317 } 318 } 319 320 return val, true 321 case objabi.R_CALLARM64, 322 objabi.R_ARM64_TLS_LE, 323 objabi.R_ARM64_TLS_IE: 324 r.Done = false 325 r.Xsym = r.Sym 326 r.Xadd = r.Add 327 return val, true 328 } 329 } 330 331 switch r.Type { 332 case objabi.R_CONST: 333 return r.Add, true 334 case objabi.R_GOTOFF: 335 return ld.Symaddr(r.Sym) + r.Add - ld.Symaddr(ctxt.Syms.Lookup(".got", 0)), true 336 case objabi.R_ADDRARM64: 337 t := ld.Symaddr(r.Sym) + r.Add - ((s.Value + int64(r.Off)) &^ 0xfff) 338 if t >= 1<<32 || t < -1<<32 { 339 ld.Errorf(s, "program too large, address relocation distance = %d", t) 340 } 341 342 var o0, o1 uint32 343 344 if ctxt.Arch.ByteOrder == binary.BigEndian { 345 o0 = uint32(val >> 32) 346 o1 = uint32(val) 347 } else { 348 o0 = uint32(val) 349 o1 = uint32(val >> 32) 350 } 351 352 o0 |= (uint32((t>>12)&3) << 29) | (uint32((t>>12>>2)&0x7ffff) << 5) 353 o1 |= uint32(t&0xfff) << 10 354 355 // when laid out, the instruction order must always be o1, o2. 356 if ctxt.Arch.ByteOrder == binary.BigEndian { 357 return int64(o0)<<32 | int64(o1), true 358 } 359 return int64(o1)<<32 | int64(o0), true 360 case objabi.R_ARM64_TLS_LE: 361 r.Done = false 362 if ctxt.HeadType != objabi.Hlinux { 363 ld.Errorf(s, "TLS reloc on unsupported OS %v", ctxt.HeadType) 364 } 365 // The TCB is two pointers. This is not documented anywhere, but is 366 // de facto part of the ABI. 367 v := r.Sym.Value + int64(2*ctxt.Arch.PtrSize) 368 if v < 0 || v >= 32678 { 369 ld.Errorf(s, "TLS offset out of range %d", v) 370 } 371 return val | (v << 5), true 372 case objabi.R_CALLARM64: 373 t := (ld.Symaddr(r.Sym) + r.Add) - (s.Value + int64(r.Off)) 374 if t >= 1<<27 || t < -1<<27 { 375 ld.Errorf(s, "program too large, call relocation distance = %d", t) 376 } 377 return val | ((t >> 2) & 0x03ffffff), true 378 } 379 380 return val, false 381 } 382 383 func archrelocvariant(ctxt *ld.Link, r *sym.Reloc, s *sym.Symbol, t int64) int64 { 384 log.Fatalf("unexpected relocation variant") 385 return -1 386 } 387 388 func asmb(ctxt *ld.Link) { 389 if ctxt.Debugvlog != 0 { 390 ctxt.Logf("%5.2f asmb\n", ld.Cputime()) 391 } 392 393 if ctxt.IsELF { 394 ld.Asmbelfsetup() 395 } 396 397 sect := ld.Segtext.Sections[0] 398 ctxt.Out.SeekSet(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff)) 399 ld.Codeblk(ctxt, int64(sect.Vaddr), int64(sect.Length)) 400 for _, sect = range ld.Segtext.Sections[1:] { 401 ctxt.Out.SeekSet(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff)) 402 ld.Datblk(ctxt, int64(sect.Vaddr), int64(sect.Length)) 403 } 404 405 if ld.Segrodata.Filelen > 0 { 406 if ctxt.Debugvlog != 0 { 407 ctxt.Logf("%5.2f rodatblk\n", ld.Cputime()) 408 } 409 ctxt.Out.SeekSet(int64(ld.Segrodata.Fileoff)) 410 ld.Datblk(ctxt, int64(ld.Segrodata.Vaddr), int64(ld.Segrodata.Filelen)) 411 } 412 if ld.Segrelrodata.Filelen > 0 { 413 if ctxt.Debugvlog != 0 { 414 ctxt.Logf("%5.2f relrodatblk\n", ld.Cputime()) 415 } 416 ctxt.Out.SeekSet(int64(ld.Segrelrodata.Fileoff)) 417 ld.Datblk(ctxt, int64(ld.Segrelrodata.Vaddr), int64(ld.Segrelrodata.Filelen)) 418 } 419 420 if ctxt.Debugvlog != 0 { 421 ctxt.Logf("%5.2f datblk\n", ld.Cputime()) 422 } 423 424 ctxt.Out.SeekSet(int64(ld.Segdata.Fileoff)) 425 ld.Datblk(ctxt, int64(ld.Segdata.Vaddr), int64(ld.Segdata.Filelen)) 426 427 ctxt.Out.SeekSet(int64(ld.Segdwarf.Fileoff)) 428 ld.Dwarfblk(ctxt, int64(ld.Segdwarf.Vaddr), int64(ld.Segdwarf.Filelen)) 429 430 machlink := uint32(0) 431 if ctxt.HeadType == objabi.Hdarwin { 432 machlink = uint32(ld.Domacholink(ctxt)) 433 } 434 435 /* output symbol table */ 436 ld.Symsize = 0 437 438 ld.Lcsize = 0 439 symo := uint32(0) 440 if !*ld.FlagS { 441 // TODO: rationalize 442 if ctxt.Debugvlog != 0 { 443 ctxt.Logf("%5.2f sym\n", ld.Cputime()) 444 } 445 switch ctxt.HeadType { 446 default: 447 if ctxt.IsELF { 448 symo = uint32(ld.Segdwarf.Fileoff + ld.Segdwarf.Filelen) 449 symo = uint32(ld.Rnd(int64(symo), int64(*ld.FlagRound))) 450 } 451 452 case objabi.Hplan9: 453 symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen) 454 455 case objabi.Hdarwin: 456 symo = uint32(ld.Segdwarf.Fileoff + uint64(ld.Rnd(int64(ld.Segdwarf.Filelen), int64(*ld.FlagRound))) + uint64(machlink)) 457 } 458 459 ctxt.Out.SeekSet(int64(symo)) 460 switch ctxt.HeadType { 461 default: 462 if ctxt.IsELF { 463 if ctxt.Debugvlog != 0 { 464 ctxt.Logf("%5.2f elfsym\n", ld.Cputime()) 465 } 466 ld.Asmelfsym(ctxt) 467 ctxt.Out.Flush() 468 ctxt.Out.Write(ld.Elfstrdat) 469 470 if ctxt.LinkMode == ld.LinkExternal { 471 ld.Elfemitreloc(ctxt) 472 } 473 } 474 475 case objabi.Hplan9: 476 ld.Asmplan9sym(ctxt) 477 ctxt.Out.Flush() 478 479 sym := ctxt.Syms.Lookup("pclntab", 0) 480 if sym != nil { 481 ld.Lcsize = int32(len(sym.P)) 482 ctxt.Out.Write(sym.P) 483 ctxt.Out.Flush() 484 } 485 486 case objabi.Hdarwin: 487 if ctxt.LinkMode == ld.LinkExternal { 488 ld.Machoemitreloc(ctxt) 489 } 490 } 491 } 492 493 if ctxt.Debugvlog != 0 { 494 ctxt.Logf("%5.2f header\n", ld.Cputime()) 495 } 496 ctxt.Out.SeekSet(0) 497 switch ctxt.HeadType { 498 default: 499 case objabi.Hplan9: /* plan 9 */ 500 ctxt.Out.Write32(0x647) /* magic */ 501 ctxt.Out.Write32(uint32(ld.Segtext.Filelen)) /* sizes */ 502 ctxt.Out.Write32(uint32(ld.Segdata.Filelen)) 503 ctxt.Out.Write32(uint32(ld.Segdata.Length - ld.Segdata.Filelen)) 504 ctxt.Out.Write32(uint32(ld.Symsize)) /* nsyms */ 505 ctxt.Out.Write32(uint32(ld.Entryvalue(ctxt))) /* va of entry */ 506 ctxt.Out.Write32(0) 507 ctxt.Out.Write32(uint32(ld.Lcsize)) 508 509 case objabi.Hlinux, 510 objabi.Hfreebsd, 511 objabi.Hnetbsd, 512 objabi.Hopenbsd, 513 objabi.Hnacl: 514 ld.Asmbelf(ctxt, int64(symo)) 515 516 case objabi.Hdarwin: 517 ld.Asmbmacho(ctxt) 518 } 519 520 ctxt.Out.Flush() 521 if *ld.FlagC { 522 fmt.Printf("textsize=%d\n", ld.Segtext.Filelen) 523 fmt.Printf("datsize=%d\n", ld.Segdata.Filelen) 524 fmt.Printf("bsssize=%d\n", ld.Segdata.Length-ld.Segdata.Filelen) 525 fmt.Printf("symsize=%d\n", ld.Symsize) 526 fmt.Printf("lcsize=%d\n", ld.Lcsize) 527 fmt.Printf("total=%d\n", ld.Segtext.Filelen+ld.Segdata.Length+uint64(ld.Symsize)+uint64(ld.Lcsize)) 528 } 529 }