In drugs, the end result gets patented. Some chemical formula that's just right, which (in most cases) was not simply stumbled upon in the pursuit of something else. And even if it was stumbled upon, it's still novel and was not likely to be created as a product or byproduct by another party very easily. The insight required to develop the drug was most likely unique.
The equivalent to most software patents today in the drug field would be patenting methods of, say, mixing chemicals. Imagine if there was a patent on mixing two solutions by pouring one from a beaker into the other in a flask, twirling around twice and then shaking gently four times. What if someone had a license to that mixing method and everyone else had to pay to do it? It'd be ridiculous. It seems like that's basically what software patents are.
The equivalent to drug patents in the software world would be, I guess, patenting an entire OS, or an app, or some fully integrated, significant piece of software. For example, no one should be able to make a counterfeit copy of iOS as a whole and sell it as their own. That I would support legally. I (think?) this is already covered by copyright law.