Linear codes over F(p) often admit a natural representation as trace c
odes of codes that are defined over an extension field F(p)m. In this
paper, we obtain estimates for the weights of subcodes of such trace c
odes. Our main result is a far-reaching generalization of the Carlitz-
Uchiyama bound for the duals of binary BCH codes. In particular, we pr
ove sharp bounds for the generalized Hamming weights of a large class
of codes, including duals of BCH codes, classical Goppa codes, Melas c
odes, and arbitrary cyclic codes of length n = p(m)-1. Our main tool i
s the theory of algebraic functions over finite fields, in particular
the Hasse-Weil bound for the number of places of degree one.