The former object becomes the new subject. That is clear -- the new subject has all the properties one could reasonably associate with a subject. Number agreement with the verb and subject raising from complement sentences, for instance.
What happens to the former subject is a more interesting question. Here are 3 theoretical answers:
I. It may not be represented overtly at all, in which case the original subject was an abstract thing called "UNSPEC" (short for unspecified). This is argued by McCawley in The Syntactic Phenomena of English.
II. It may become part of a manner adverb with "by". This is argued by Chomsky in Aspects of the Theory of Syntax. The reasoning here is that we need to explain the "fact" that only verbs that are subcategorized to co-occur with manner adverbs can be passivized. Unfortunately for Chomsky's proposal, this is not so. Cf. "Ohio is bounded on the north by Lake Erie."
III. In Relational Grammar (by Postal and Perlmutter in various articles), the former subject is a chomeur, meaning it no longer bears any grammatical relation in the clause. I like this theory, because of an interesting generalization discovered by McCawley (reported in the same reference as above).
McCawley undertakes a detailed examination of the structure of passive sentences, and finds that the passive by-phrase can turn up in several different places -- in fact, anywhere it will fit into the derived passive structure.
Now, for those theories that associate the internal structure of clauses with the order in which verb-functions apply to their arguments (like Categorial Grammar and HPSG) and further associate this order with grammatical relation (like HPSG and my theory, 2psg), McCawley's fact is predicted.
Since a by-phrase chomeur bears no particular grammatical relation to the verb, the order in which the verb-function applies to this argument is arbitrary, so you should get a number of different derived structures in the passive.
I believe I am the first to have noticed this convergence between McCawley's theory and Relational Grammar.