diff --git a/src/cmd/5l/asm.c b/src/cmd/5l/asm.c index 017d3f4357fd4d..c95e43bcc0136d 100644 --- a/src/cmd/5l/asm.c +++ b/src/cmd/5l/asm.c @@ -510,24 +510,8 @@ adddynsym(Link *ctxt, LSym *s) /* shndx */ if(s->type == SDYNIMPORT) adduint16(ctxt, d, SHN_UNDEF); - else { - switch(s->type) { - default: - case STEXT: - t = 11; - break; - case SRODATA: - t = 12; - break; - case SDATA: - t = 13; - break; - case SBSS: - t = 14; - break; - } - adduint16(ctxt, d, t); - } + else + adduint16(ctxt, d, 1); } else { diag("adddynsym: unsupported binary format"); } diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c index 41c9cc84c64bf0..20be4d6dbcd441 100644 --- a/src/cmd/6l/asm.c +++ b/src/cmd/6l/asm.c @@ -548,24 +548,8 @@ adddynsym(Link *ctxt, LSym *s) /* section where symbol is defined */ if(s->type == SDYNIMPORT) adduint16(ctxt, d, SHN_UNDEF); - else { - switch(s->type) { - default: - case STEXT: - t = 11; - break; - case SRODATA: - t = 12; - break; - case SDATA: - t = 13; - break; - case SBSS: - t = 14; - break; - } - adduint16(ctxt, d, t); - } + else + adduint16(ctxt, d, 1); /* value */ if(s->type == SDYNIMPORT) diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c index 8b91c0971a28a1..ff4911b88af0b4 100644 --- a/src/cmd/8l/asm.c +++ b/src/cmd/8l/asm.c @@ -516,24 +516,8 @@ adddynsym(Link *ctxt, LSym *s) /* shndx */ if(s->type == SDYNIMPORT) adduint16(ctxt, d, SHN_UNDEF); - else { - switch(s->type) { - default: - case STEXT: - t = 11; - break; - case SRODATA: - t = 12; - break; - case SDATA: - t = 13; - break; - case SBSS: - t = 14; - break; - } - adduint16(ctxt, d, t); - } + else + adduint16(ctxt, d, 1); } else if(HEADTYPE == Hdarwin) { diag("adddynsym: missed symbol %s (%s)", s->name, s->extname); } else if(HEADTYPE == Hwindows) {