Summary
Linear codes constructed from defining sets have been extensively studied since they may have good parameters if the defining sets are chosen properly. Let F-pm be the finite field with p(m) elements, where p is an odd prime and m is a positive integer. In this paper, we study the linear code C-D = {(Tr(alpha x))(x is an element of D) vertical bar alpha is an element of F-pm} by choosing the defining set D = {x is an element of F-pm* vertical bar Tr(ax(2) + bx) = 0}, where a is an element of F-pm*( )and b is an element of F-pm. Several classes of linear codes with explicit weight distribution are obtained. The parameters of some proposed codes are new. Several examples show that some of our codes are optimal or almost optimal according to the tables of best codes known in Grassl. Our results generalize some results in Ding and Ding (IEEE Trans. Inf. Theory 61(11):5835-5842, 2015), Li et al. (Disc. Math. 241:25-38, 2018).