NEW YORK (AP) _ Rock Hudson agonized over a scene calling for him to kiss Linda Evans on an episode of ''Dynasty,'' but went through with it despite knowing that he had AIDS, according to an excerpt from his book printed in this week's People magazine.

''I've got to kiss Linda. What the hell am I going to do?'' he reportedly asked his secretary, Mark Miller, after receiving the script a week before the kissing scene was shot.

''He was trapped,'' said Miller. ''He couldn't ask them to change the script. He felt either you announce you have AIDS or kiss the lady.''

According to the excerpt from ''Rock Hudson, His Story,'' co-written with journalist Sara Davidson, ''On the day the kiss with Linda Evans was shot, Rock used every gargle, mouthwash and spray he could get his hands on. He told Mark, 'the kiss is over with. Thank God.' He said it was one of the worst days in his life.''

Hudson kept the news of his illness from Ms. Evans as well as from his lover, Marc Christian.

Actor George Nader, a close friend of the box office superstar, said Hudson was terrified that Christian would reveal Rock's secret.

The night the ''Dynasty'' episode was shown, Nader watched it and made a tape, according to the excerpt.

''I could see where Rock kept his lips closed and hit Linda on the side of the cheek for a brief, chaste kiss,'' said Nader. ''He did not open his mouth, no saliva was exchanged.''

Hudson reportedly had sex with three men in the months before he learned he had AIDS. He sent each an anonymous note, telling them to have tests made, according to the excerpt.