From non-linear least squares to weighted linear least squares

Given an overdetermined linear system $$A \in \mathbb{R}^{m \times n}$$, $$b \in \mathbb{R}^{m \times 1}$$. And a non-linear function $$f(x)$$. Given a non-linear least squares: $$e^* = \min_g \left\lVert f(A g) - {b}\right\rVert_2^2,$$ where the function $$f(x)$$ is applied element-wise. What would be the best weight $$W$$ depending on $$b$$ for a weighted linear least squares $$\hat{e} = \min_g \left\lVert W A g - W b\right\rVert_2^2,$$ such that $$\min{|e^* - \hat{e}|}$$.