You're right that boys are marketed to differently than girls, and there is still a heavy bias in media, fashion, and toys towards antiquated gender roles.
But it doesn't explain the lack of women in software, because there are record-breaking numbers of women going into fields that were previously stereotypically male. All the physical sciences, law, medicine, you name it. Women are busting out of the traditional gender stereotypes in every direction except software.
So whatever the effects of gender role indoctrination in children, the software industry is doing worse, much much worse than even that pathetic baseline.
Knowing this, IMO blaming the phenomenon on society in general is a huge cop out. We are doing far, far worse than just about any other profession.
Remember, the software industry is where "nerds" go, but the "smart money" is in finance and the "creme of the crop" is in finance.
My thinking is that in aggregate women choose to go to the highest paying, and most socially prestigious fields: law, medicine, finance, sciences in that order.